For the complete documentation index, see llms.txt. This page is also available as Markdown.

eth_getUncleCountByBlockHash - BSC

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

The eth_getUncleCountByBlockHash method returns the number of uncles in a block by block hash. On BSC with PoSA consensus, this typically returns 0.

BSC uses PoSA consensus and does not produce uncle blocks in normal operation, so this method will generally return 0 (0x0).

Parameters

Parameter
Type
Required
Description

blockHash

string

Yes

32-byte block hash

Request Example

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

Response Example

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

Response Parameters

Parameter
Type
Description

result

string

Uncle count (0x0 on BSC)

Use Cases

  • EVM compatibility verification

  • Cross-chain applications

Error Handling

Error Code
Description

-32602

Invalid params

null result

Block not found

SDK Integration

Last updated

Was this helpful?