eth_getUncleByBlockNumberAndIndex

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

Request

curl https://tn.henesis.io/ethereum/mainnet?clientId=<clientId> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params":["0x29c", "0x0"],"id":1}'

Response

{
"id":1,
"jsonrpc":"2.0",
"result": {
"number": "0x1b4", // 436
"hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"parentHash": "0x9646252be9520f6e71339a8df9c55e4d7619deeb018d2a3f2d21fc165dde5eb5",
"nonce": "0xe04d296d2460cfb8472af2c5fd05b5a214109c25688d3704aed5484f9a7792f2",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"logsBloom": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"stateRoot": "0xd5855eb08b3387c0af375e9cdb6acfc05eb8f519e419b874b6ff2ffda7ed1dff",
"miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
"difficulty": "0x027f07", // 163591
"totalDifficulty": "0x027f07", // 163591
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"size": "0x027f07", // 163591
"gasLimit": "0x9f759", // 653145
"gasUsed": "0x9f759", // 653145
"timestamp": "0x54e34e8e" // 1424182926
"transactions": [{...},{ ... }]
"uncles": ["0x1606e5...", "0xd5145a9..."]
}
}

Parameters

  • QUANTITY|TAG - a block number, or the string "earliest", "latest" or "pending", as in the default block parameter.

  • QUANTITY - the uncle's index position.

Returns

Object - A block object, or null when no block was found:

Name

Type

Description

number

QUANTITY

The block number. null when it is pending block.

hash

32-byte DATA

Hash of the block. null when it is pending block.

parentHash

32-byte DATA

Hash of the parent block.

logsBloom

256-byte DATA

The bloom filter for the logs of the block. null when it is pending block.

nonce

8-byte

DATA

Hash of the generated proof-of-work. null when its pending block.

sha3Uncles

DATA

SHA3 of the uncles data in the block.

transactionsRoot

32-byte DATA

The root of the transaction trie of the block.

stateRoot

32-byte DATA

The root of the final state trie of the block.

receiptsRoot

32-byte DATA

The root of the receipts trie of the block.

reward

20-byte DATA

The address of the beneficiary to whom the block rewards were given.

miner

20-byte

DATA

The address of the beneficiary to whom the mining rewards were given.

difficulty

QUANTITY

integer of the difficulty for this block.

totalDifficulty

QUANTITY

integer of the total difficulty of the chain until this block.

extraData

DATA

The "extra data" field of this block.

size

QUANTITY

Integer the size of this block in bytes.

gasLimit

QUANTITY

The maximum gas allowed in this block.

gasUsed

QUANTITY

The total used gas by all transactions in this block.

timestamp

QUANTITY

The Unix timestamp for when the block was collated.

transactions

Array

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

uncles

Array

Array of uncle hashes.

Reference

​https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getunclebyblocknumberandindex​ ​