🟪 Polygon
eth_getUncleByBlockNumberAndIndex

Polygon API Documentation


eth_getUncleByBlockNumberAndIndex RPC Method

eth_getUncleByBlockNumberAndIndex method returns 'uncle' Information of a block by block number and the Uncle index position.

Parameters

Block number - [required] - Block number as hexadecimal, or the string "latest", "earliest" or "pending".

Uncle index position - [required] - An integer indicating the uncle's index position encoded as hexadecimal.

params: [
    '0x10309F3', '0x0'
    ]

Returns

  • Block object or null when no block was found. Properties

    • number - The block number. Null when the returned block is the pending block.

    • hash 32 Bytes - Hash of the block. In case of a pending block, it returns null.

    • parentHash 32 Bytes - Hash of the parent block.

    • nonce 8 Bytes - Hash of the generated proof-of-work. Null if pending.

    • difficulty - The integer of the difficulty for this block encoded as a hexadecimal string.

    • totalDifficulty - Hexadecimal of the total difficulty of the chain until this block.

    • logsBloom - The bloom filter for the logs of the block. null if pending.

    • sha3uncles - SHA3 of the uncles data in the block.

    • extraData - The “extra data” field of this block.

    • timestamp - The Unix timestamp for when the block was collated.

    • size - The unix timestamp for when the block was collated.

    • miner 20 Bytes - The address of the miner receiving the reward.

    • transactionsRoot - The root of the transaction trie of the block.

    • stateRoot - The root of the final state trie of the block.

    • receiptsRoot 32 Bytes - The root of the receipts trie of the block.

    • uncles - An Array of uncle hashes.

    • transactions - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.

    • gasUsed - The total used gas by all transactions in this block as a hexadecimal string.

    • gasLimit - The maximum gas allowed in this block encoded as a hexadecimal.

    • mixHash - A string of a 256-bit hash encoded as a hexadecimal.

    • baseFeePerGas - A string of the base fee encoded in hexadecimal format.

Request

POST https://<network>.chainnodes.org/YOUR-API-KEY

Example

Need RPC API keys?

Get 12.5M archival requests for free today.

  • HTTPS POST Request with a JSON RPC call in the body
  • Replace YOUR-API-KEY with the API key from your CHAINNODES.ORG Dashboard
  • You can use a different supported network by replacing polygon-mainnet
curl https://polygon-mainnet.chainnodes.org/YOUR-API-KEY \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params": ["0x10309F3","0x0"],"id":1}'

Body

{
  "jsonrpc":"2.0",
  "id":1,
  "result":null
  }
 

💡 Confusing?

Ask our experienced blockchain developers in Telegram

JSON-RPC API Documentation by CHAINNODES is based on Erigon node client. Contact us if you are interested in specific methods that are only available on geth, besu, Nethermind or reth.

Last updated on