eth_getUncleByBlockHashAndIndex

Returns information about the 'Uncle' of a block by hash and the Uncle index position.

Parameters

Object NameRequiredTypeDetail
BLOCK HASHStringHash of the block.
UNCLE INDEX POSITIONStringA hex code of an integer that represents the uncle's index position.
"params": [
    "0x4e5f091771db9bc338fdcdbbdae56ea559efcf47d1b10bf4039ef70ee5f1f735",
    "0x0"
]

Result

A block object, or null when no block was found.

Result Fields

KeyTypeDetail
difficultyStringA hex code of an integer that represents the difficulty for this block.
extraDataStringThe "extra data" field of this block.
gasLimitStringA hex code of an integer that represents the maximum gas allowed in this block.
gasUsedStringA hex code of an integer that represents the total used gas by all transactions in this block.
hashStringHash of the block. null if the returned block is a pending block.
logsBloomStringThe bloom filter for the logs of the block. null if the returned block is a pending block.
minerStringAddress of the beneficiary to whom the mining rewards were given.
nonceStringHash of the generated proof-of-work. null if the returned block is a pending block.
numberStringA hex code of an integer that represents the block number. null if the returned block is a pending block.
parentHashStringHash of the parent block.
receiptsRootStringThe root of the receipts trie of the block.
sha3UnclesStringSHA3 of the uncles data in the block.
sizeStringA hex code of an integer that represents the size of this block in bytes.
stateRootStringThe root of the final state trie of the block.
timestampIntegerThe unix timestamp for when the block was collated.
totalDifficultyStringA hex code of an integer that represents the difficulty of the chain until this block.
transactionsRootStringThe root of the transaction trie of the block.
unclesArrayArray of uncle hashes.

🚧

NOTE: The return does not contain a list of transactions in the uncle block, to get this, make another request to eth_getBlockByHash or eth_getBlockByNumber

Example

Request

curl <your-endpoint> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params": ["0x4e5f091771db9bc338fdcdbbdae56ea559efcf47d1b10bf4039ef70ee5f1f735","0x0"],"id":1}'

Return

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "number": "0x0",
        "hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "timestamp": "0x0",
        "miner": "0x0000000000000000000000000000000000000000",
        "transactionsRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "stateRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "receiptsRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "nonce": "",
        "sha3Uncles": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "logsBloom": "",
        "difficulty": "0x0",
        "totalDifficulty": "0x0",
        "size": "0x0",
        "gasLimit": "0x0",
        "gasUsed": "0x0",
        "extraData": "",
        "uncles": null,
        "transactions": null
    }
}
Language
Click Try It! to start a request and see the response here!