eth_getUncleCountByBlockHash
Count uncle (ommer) blocks for a given block hash on Ethereum networks. Returns a hex-encoded integer.
Instructions
Returns the number of uncle (ommer) blocks in a specific block identified by its hash.
Args:
blockHash (string): 32-byte hash of the block to query (e.g., '0xabc123...')
network (string, optional): Ethereum network to query, defaults to 'mainnet'
Returns:
Hex-encoded integer representing the number of uncles in the block (e.g., '0x0' for no uncles, '0x2' for two uncles)
Examples:
"Get uncle count for block": { "blockHash": "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35" }
"Query on Sepolia": { "blockHash": "0xabc...", "network": "sepolia" }
Errors:
InvalidParams: When blockHash is not a valid 32-byte hex string
InternalError: When Infura API is unavailable
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| blockHash | Yes | The 32-byte block hash to query. | |
| network | No | The Ethereum network to query, e.g., 'mainnet' or 'sepolia'. | mainnet |
| response_format | No | Output format: 'json' for structured data, 'markdown' for human-readable. | json |