eth_getUncleByBlockNumberAndIndex | Base

Base API method that returns information about an uncle block by block number and uncle index position. Note that uncles are a concept specific to proof-of-work chains and don't exist in proof-of-stake chains like Base.

👍

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • BLOCK PARAMETER - the block number, or one of the following string values:
    • "latest" - the most recent block
    • "earliest" - the genesis block
    • "pending" - the pending block
    • "safe" - the most recent safe block
    • "finalized" - the most recent finalized block
  • UNCLE INDEX POSITION - the uncle's index position. It's a hexadecimal value representing the uncle's position in the block's uncle list.

Response

  • result — A block object with uncle information, or null when no uncle exists at the given index. The block object includes:
    • number: The block number
    • hash: Hash of the uncle block
    • parentHash: Hash of the parent block
    • nonce: Hash of the generated proof-of-work
    • sha3Uncles: SHA3 of the uncles data in the block
    • logsBloom: The bloom filter for the logs of the block
    • transactionsRoot: The root of the transaction trie of the block
    • stateRoot: The root of the final state trie of the block
    • receiptsRoot: The root of the receipts trie of the block
    • miner: The address of the beneficiary to whom the mining rewards were given
    • difficulty: Integer of the difficulty for this block
    • totalDifficulty: Integer of the total difficulty of the chain until this block
    • extraData: The "extra data" field of this block
    • size: Integer 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

Use case

The eth_getUncleByBlockNumberAndIndex method is primarily used in proof-of-work networks for:

  • Historical analysis of uncle blocks at specific block heights
  • Calculating mining rewards for uncle blocks
  • Studying network fork behavior and block propagation
  • Blockchain research and analysis tools

Note: In Base, which is a proof-of-stake chain, this method will typically return null as there are no uncle blocks in PoS networks.

Try the eth_getUncleByBlockNumberAndIndex RPC method yourself

Language
Click Try It! to start a request and see the response here!