eth_getUncleByBlockNumberAndIndex - Ethereum

eth_getUncleByBlockNumberAndIndex. Returns information about an uncle of a block by number and uncle index position

eth_getUncleByBlockNumberAndIndex - ethereum [Value: 15CU]
Returns information about an uncle of a block by number and uncle index position.
Use cases

Use cases

  • Retrieve specific uncle block by number and index
  • Analyze uncle blocks to understand fork occurrences
  • Validate uncle block data for blockchain consistency
Constraints

Constraints

  • Requires valid block number and index input
  • Node must be fully synchronized with blockchain
  • Depends on accurate block hash and index
Get started
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key

Language

Request
Examples
curl --request POST \
     --url https://eth.drpc.org \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "params": [
    "latest",
    "0x0"
  ],
  "method": "eth_getUncleByBlockNumberAndIndex"
}
'
Copy
Response
200
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "author": "0x8e5c6e6350d5799f45b564c3419d5d06d1a7de32",
    "difficulty": "0x2b1ae4d6e2df3",
    "extraData": "0x6d696e656420776974682067657468706f6f6c2e636f6d",
    "gasLimit": "0x7a1200",
    "gasUsed": "0x0",
    "hash": "0x829df9bb801fc0494abf2f443423a49ffa32964554db71b098d332d87b70a48b",
    "logsBloom": "0x0",
    "miner": "0x8e5c6e6350d5799f45b564c3419d5d06d1a7de32",
    "mixHash": "0x59daa4a1e74f051b4e009e1913af947a494dbb08c1761da00758cd287e6cd926",
    "nonce": "0x0000000000000000",
    "number": "0x1b4",
    "parentHash": "0x5e2d4c5a2c0c579db3ed23d6581e33e58603ecdb7e01ef94b1b1d1f392dd5ea9",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad0df6ddf4c2e648a1e4dbe849f3a0929",
    "size": "0x220",
    "stateRoot": "0xd7f8974fb5ac78d7a94f0b5121e357eebcc3a7b45b1e59f616b7f1e70b64c76d",
    "timestamp": "0x55ba467c",
    "totalDifficulty": "0x3b6b3e06244483",
    "transactions": [],
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "uncles": []
  }
}
Copy

Request params

idinteger
jsonrpcstring
methodstring
Parametersarray of strings
array of strings
blockNumberarray_of_strings
The block hash or the block tags.
  • latest [default] - the blockchain's most recent block
  • safe - a block validated by the beacon chain
  • finalized - a block confirmed by over two-thirds of validators
  • earliest - the first or genesis block
  • pending - transactions broadcasted but not yet included in a block
indexstring
The uncle''s index position (in hex).

Response

200
A block object with the following fields, or null when no block was found.

Response params

object
idinteger
jsonrpcstring
resultobject
A block object with the following fields, or null when no block was found.
object
noncestring
8 Bytes - hash of the generated proof-of-work, null when its pending block.
hashstring
32 Bytes - hash of the block, null when its pending block.
baseFeePerGasstring
32 Bytes - hash of the block, null when its pending block.
numberstring
The block number, null when its pending block.
parentHashstring
32 Bytes - hash of the parent block.
sha3Unclesstring
32 Bytes - SHA3 of the uncles data in the block.
logsBloomstring
256 Bytes - the bloom filter for the logs of the block, null when its pending block.
transactionsRootboolean
32 Bytes - the root of the transaction trie of the block.
stateRootarray_of_strings
32 Bytes - the root of the final state trie of the block.
receiptsRootstring
32 Bytes - the root of the receipts trie of the block.
minerstring
20 Bytes - the address of the beneficiary to whom the mining rewards were given.
difficultystring
Integer of the difficulty for this block.
totalDifficultystring
Integer of the total difficulty of the chain until this block.
extraDatastring
The "extra data" field of this block.
sizestring
Integer the size of this block in bytes.
gasLimitstring
The maximum gas allowed in this block.
timestampstring
The unix timestamp for when the block was collated.
transactionsstring
Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.
unclesstring
Array of uncle hashes.