eth_getUncleByBlockHashAndIndex - BSC

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

This method returns information about an uncle block by block hash and uncle index. Note: BSC uses Proof of Staked Authority and typically does not produce uncle blocks like Ethereum PoW.

Parameters

Parameter
Type
Required
Description

blockHash

string

Yes

32-byte block hash

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_getUncleByBlockHashAndIndex",
    "params": ["0x4e3a3754410177e6937ef1f84bba68ea139e8d1a2258c5f85db9f1cd715a1bdd", "0x0"],
    "id": "getblock.io"
}'

Response Example

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

Response Parameters

Parameter
Type
Description

result

object/null

Uncle block or null (typically null on BSC)

Use Cases

  • EVM compatibility testing

  • Cross-chain application development

Error Handling

Error Code
Description

-32602

Invalid params

null result

No uncle at index

SDK Integration

Last updated

Was this helpful?