Returns the number of uncles in a block from a block matching the given block hash.
Request Format
{
"jsonrpc": "2.0",
"method": "eth_getUncleCountByBlockHash",
"params": [
"0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
],
"id": 1
}
Response Format
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
Parameters
- Block Hash (
hash32
): The hash of the block.
Return Value
- Uncle Count (
uint
ornotFound
): Returns the number of uncles in the specified block.
Example
Request
{
"jsonrpc": "2.0",
"method": "eth_getUncleCountByBlockHash",
"params": [
"0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"
],
"id": 1
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
Notes
- Useful for retrieving the number of uncles included in a specific block.
- If the block is not found, the response will return
notFound
.