eth_getUncleByBlockHashAndIndex

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

Uncle block: It can be understood as a temporary block that has not been merged into the main block. In the Bitcoin protocol, such blocks that are not on the main chain are called "orphan block". Orphan blocks are not part of the main block. And it will not be referenced by blocks on the main chain. In Ethereum, these are called "uncle block", and like the "orphan block" of the Bitcoin protocol, transactions on uncle blocks are not executed and are not part of the main block.

Parameters

  • BLOCK-HASH [required] a string representing the hash (32 bytes) of a block.

  • UNCLE-INDEX [required] a hex of the integer indicating the uncle's index position.

Request

curl https://eth-mainnet.solarpath.io/v1/YOUR-API-KEY \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getUncleByBlockHashAndIndex", "params": ["0xe429155011f1e8bcd46802dd261c6855e5fe3ed4d1622d047920e40dcb0e0da8", "0x0"]}'

Response

{
  "id": 1,
  "jsonrpc": "2.0",
  "result": []
}

Because the uncle block is not part of the main block and will not be referenced by the main chain (or referenced for a period of time), eth_getUncleByBlockHashAndIndex will return an empty array no matter what kind of query it is.

Last updated