eth_getUncleByBlockNumberAndIndex - Ethereum
eth_getUncleByBlockNumberAndIndex. Retrieves information about an uncle block by the block's number and the uncle's index position
eth_getUncleByBlockNumberAndIndex - ethereum [Value: 15CU]
Retrieves information about an uncle block by the block's number and the uncle's index position
Use cases
- Retrieve specific uncle block by number and index
- Analyze uncle blocks to understand fork occurrences
- Validate uncle block data for blockchain consistency
Constraints
- Requires valid block number and index input
- Node must be fully synchronized with blockchain
- Depends on accurate block hash and index
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key
Language
Request
Examples
curl --request POST \
--url https://eth.drpc.org \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"params": [
"latest",
"0x0"
],
"method": "eth_getUncleByBlockNumberAndIndex"
}
'
Response
200
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"author": "0x8e5c6e6350d5799f45b564c3419d5d06d1a7de32",
"difficulty": "0x2b1ae4d6e2df3",
"extraData": "0x6d696e656420776974682067657468706f6f6c2e636f6d",
"gasLimit": "0x7a1200",
"gasUsed": "0x0",
"hash": "0x829df9bb801fc0494abf2f443423a49ffa32964554db71b098d332d87b70a48b",
"logsBloom": "0x0",
"miner": "0x8e5c6e6350d5799f45b564c3419d5d06d1a7de32",
"mixHash": "0x59daa4a1e74f051b4e009e1913af947a494dbb08c1761da00758cd287e6cd926",
"nonce": "0x0000000000000000",
"number": "0x1b4",
"parentHash": "0x5e2d4c5a2c0c579db3ed23d6581e33e58603ecdb7e01ef94b1b1d1f392dd5ea9",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad0df6ddf4c2e648a1e4dbe849f3a0929",
"size": "0x220",
"stateRoot": "0xd7f8974fb5ac78d7a94f0b5121e357eebcc3a7b45b1e59f616b7f1e70b64c76d",
"timestamp": "0x55ba467c",
"totalDifficulty": "0x3b6b3e06244483",
"transactions": [],
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
Request params
idinteger
jsonrpcstring
methodstring
array of strings
blockNumberstring
(optional) Block number as an integer, or string
- latest [default] - The most recent block in the blockchain (default).
- earliest - The first block, also known as the genesis block.
- pending - Transactions that have been broadcast but not yet included in a block.
indexstring
Response
200
The uncle block object if foundResponse params
object
idinteger
jsonrpcstring
resultobject
object
baseFeePerGasstring
Hexadecimal string of the base fee per gas. Not included for blocks before the EIP-1559 upgrade.
difficultyinteger
The block's difficulty level, encoded as a hexadecimal.
extraDatastring
Additional data field of the block.
gasLimitstring
Maximum gas allowed in the block, in hexadecimal.
gasUsedstring
Total gas used by all transactions in the block, in hexadecimal.
hashstring
Hash of the block, null if pending.
logsBloomstring
Bloom filter for the block's logs, null if pending.
minerstring
Address of the block's mining reward beneficiary.
mixHashstring
256-bit hash as a hexadecimal string.
noncestring
Proof-of-work hash, null if pending.
numberstring
Block number as a hexadecimal, null if pending.
parentHashstring
Hash of the parent block.
receiptsRootstring
Root of the block's receipts trie.
sha3Unclesstring
SHA3 hash of the block's uncles data.
sizestring
Size of the block in bytes, as a hexadecimal integer.
stateRootstring
Root of the block's final state trie.
timestampstring
UNIX timestamp of the block's collation.
totalDifficultystring
Total difficulty of the blockchain up to this block, in hexadecimal.
transactionsarray
List of transaction objects; refer to eth_getTransactionByHash for details.
transactionsRootstring
Root of the block's transaction trie.
unclesarray
List of uncle block hashes.