eth_getUncleCountByBlockNumber - Ethereum

Gives you the quantity of uncles that fit the block number you enter

How to Use the eth_getUncleCountByBlockNumber Method

Parameters

QUANTITY|TAG - the string "latest", "earliest" or "pending", or an integer block number, check out the default block parameter for details.

What you receive

QUANTITY - the number of uncles in the given block presented as an integer.

Sample

Here is a typical appliance example.

Call

curl https://eth-mainnet.rpcfast.com/?api_key=<key> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params":["0xe8"],"id":1}'

Outcome

{
  "jsonrpc": "2.0",
  "id": 0,
  "result": "0x0"
}

Last updated