eth_getUncleByBlockHashAndIndex RPC Method
Returns information about the 'Uncle' of a block by hash and the Uncle index position.
Parameters
BlockHash
[required] - String- The hash (32 bytes) of the block to retrieve.
Uncle index position
[required] - An integer indicating the uncle's index position encoded as hexadecimal.
params: [
'0x6730865e4d068c4b0246d7fbe609d7a2cebacea77c7bc5df0d21d77d75d9dcc6', '0x0'
]
Returns
-
Block object
or null when no block was found. Properties-
number
- The block number. Null when the returned block is the pending block. -
hash
32 Bytes - Hash of the block. In case of a pending block, it returns null. -
parentHash
32 Bytes - Hash of the parent block. -
nonce
8 Bytes - Hash of the generated proof-of-work. Null if pending. -
difficulty
- The integer of the difficulty for this block encoded as a hexadecimal string. -
totalDifficulty
- Hexadecimal of the total difficulty of the chain until this block. -
logsBloom
- The bloom filter for the logs of the block. null if pending. -
sha3uncles
- SHA3 of the uncles data in the block. -
extraData
- The “extra data” field of this block. -
timestamp
- The Unix timestamp for when the block was collated. -
size
- The unix timestamp for when the block was collated. -
miner
20 Bytes - The address of the miner receiving the reward. -
transactionsRoot
- The root of the transaction trie of the block. -
stateRoot
- The root of the final state trie of the block. -
receiptsRoot
32 Bytes - The root of the receipts trie of the block. -
uncles
- An Array of uncle hashes. -
transactions
- Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter. -
gasUsed
- The total used gas by all transactions in this block as a hexadecimal string. -
gasLimit
- The maximum gas allowed in this block encoded as a hexadecimal. -
mixHash
- A string of a 256-bit hash encoded as a hexadecimal. -
baseFeePerGas
- A string of the base fee encoded in hexadecimal format.
-
Request
POST https://<network>.chainnodes.org/YOUR-API-KEY
Example
Confusing? Ask blockchain developers in Chainnodes Telegram Chat (opens in a new tab)
- HTTPS POST Request with a JSON RPC call in the body
- Replace YOUR-API-KEY with the API key from your Chainnodes.org Dashboard
- You can use a different supported network by replacing
mainnet
curl https://mainnet.chainnodes.org/YOUR-API-KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params": ["0x6730865e4d068c4b0246d7fbe609d7a2cebacea77c7bc5df0d21d77d75d9dcc6","0x0"],"id":1}'
Body
{
"jsonrpc":"2.0",
"id":1,
"result":null
}