eth_getUncleByBlockHashAndIndex
Returns information about the 'Uncle' of a block by hash and the Uncle index position.
REQUEST
POST https://<network>.chainrpc.io/v3/YOUR-API-KEYHEADERS
Content-Type: application/jsonREQUEST PARAMS
BLOCK HASH[required] - a string representing the hash (32 bytes) of a blockUNCLE INDEX POSITION[required] - a hex of the integer indicating the uncle's index position.
EXAMPLE
## JSON-RPC over HTTPS POST
## Replace YOUR-API-KEY with an API key from your chainRPC Dashboard
## You can also replace mainnet with a different supported network
curl https://rpc.chainrpc.io/v3/YOUR-API-KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}'
## JSON-RPC over WSS
## Replace YOUR-API-KEY with an API key from your chainRPC Dashboard
## You can also replace mainnet with a different supported network
wscat -c wss://eth.chainrpc.io/v3/YOUR-API-KEY
>{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}RESPONSE
RESULT FIELDS
BLOCK- A block object, or null when no block was foundnumber: the block number. Null when the returned block is the pending block.hash: 32 Bytes - hash of the block. null when its pending block.parentHash: 32 Bytes - hash of the parent block.nonce: 8 Bytes - hash of the generated proof-of-work. Null when the returned block is the pending block.sha3Uncles: 32 Bytes - SHA3 of the uncles data in the block.logsBloom: 256 Bytes - the bloom filter for the logs of the block. Null when the returned block is the pending block.transactionsRoot: 32 Bytes - the root of the transaction trie of the block.stateRoot: 32 Bytes - the root of the final state trie of the block.receiptsRoot: 32 Bytes - the root of the receipts trie of the block.miner: 20 Bytes - the address of the beneficiary to whom the mining rewards were given.difficulty: hexadecimal of the difficulty for this block.totalDifficulty: hexadecimal of the total difficulty of the chain until this block.extraData: the "extra data" field of this block.size: hexadecimal the size of this block in bytes.gasLimit: the maximum gas allowed in this block.gasUsed: the total used gas by all transactions in this block.timestamp: the unix timestamp for when the block was collated.uncles: an Array of uncle hashes.
Note: An uncle doesn't contain individual transactions.
BODY
Last updated