eth_getUncleByBlockNumberAndIndex

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-NUMBER [required] a hexadecimal block number, or the string latest, earliest or pending, See the default block parameter.

  • 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_getUncleByBlockNumberAndIndex", "params": ["latest", "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_getUncleByBlockNumberAndIndex will return an empty array no matter what kind of query it is.

Last updated