eth_getUncleByBlockNumberAndIndex - BSC

Example code for the eth_getUncleByBlockNumberAndIndex JSON RPC method. Сomplete guide on how to use eth_getUncleByBlockNumberAndIndex JSON RPC in GetBlock Web3 documentation.

This method gets uncle block information by block number and uncle index on BSC. BSC uses PoSA consensus and typically does not produce uncle blocks.

Parameters

Parameter
Type
Required
Description

blockNumber

string

Yes

Block number (hex) or "latest"

index

string

Yes

Uncle index (hex)

Request Example

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_getUncleByBlockNumberAndIndex",
    "params": ["latest", "0x0"],
    "id": "getblock.io"
}'

Response Example

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": null
}

Response Parameters

Parameter
Type
Description

result

object/null

Uncle block (typically null on BSC)

Use Cases

  • EVM compatibility checks

  • Cross-chain development

Error Handling

Error Code
Description

-32602

Invalid params

SDK Integration

Last updated

Was this helpful?