post https://api.infstones.com/ethereum/mainnet/
Returns information about the 'Uncle' of a block by block number and the Uncle index position.
Parameters
Object Name | Required | Type | Detail |
---|---|---|---|
BLOCK PARAMETER | ✅ | String/Object | A hex code of an integer that represents the block number, "latest", "earliest" , "pending" , or hash of a block. The hash of a block is an object specified as: {"blockHash": "\<hash_value>"} . Learn more here. |
UNCLE INDEX POSITION | ✅ | String | A hex code of an integer that represents the uncle's index position. |
"params": [
"0x5bad54",
"0x0"
]
Result
A block object, or null
when no block was found.
Result Fields
Key | Type | Detail |
---|---|---|
difficulty | String | A hex code of an integer that represents the difficulty for this block. |
extraData | String | The "extra data" field of this block. |
gasLimit | String | A hex code of an integer that represents the maximum gas allowed in this block. |
gasUsed | String | A hex code of an integer that represents the total gas used by all transactions in this block. |
hash | String | Hash of the block. null if the returned block is a pending block. |
logsBloom | String | The bloom filter for the logs of the block. null if the returned block is a pending block. |
miner | String | Address of the beneficiary to whom the mining rewards were given. |
nonce | String | Hash of the generated proof-of-work. null if the returned block is a pending block. |
number | String | A hex code of an integer that represents the block number. null if the returned block is a pending block. |
parentHash | String | Hash of the parent block. |
receiptsRoot | String | The root of the receipts trie of the block. |
sha3Uncles | String | SHA3 of the uncles data in the block. |
size | String | A hex code of an integer that represents the size of this block in bytes. |
stateRoot | String | The root of the final state trie of the block. |
timestamp | Integer | The unix timestamp for when the block was collated. |
totalDifficulty | String | A hex code of an integer that represents the difficulty of the chain until this block. |
transactionsRoot | String | The root of the transaction trie of the block. |
uncles | Array | Array of uncle hashes. |
NOTE: The return does not contain a list of transactions in the uncle block, to get this, make another request to
eth_getBlockByHash
oreth_getBlockByNumber
Example
Request
curl <your-endpoint> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params": ["0x5bad54","0x0"],"id":1}'
Return
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"difficulty": "0xbf93d9424b943",
"extraData": "0x73656f33",
"gasLimit": "0x7a121d",
"gasUsed": "0x7936f4",
"hash": "0x407116a0f58ad370ac6c45813665988903f4c60ecc2f112d55cbf43a8c33f48e",
"logsBloom": "0x804e00000660061481081001000002000804080b1012106100a001010248430040000008104c0200200003020070104a00008404000000c2c00010010304410000148c2019288401020881090040243240312000b80c2084a111c2010221081042004400028c2880a000104810004a1000208001240000000088011002200000048024000140004894689004026980000588001040a02000828400480302010020008060208084084e20020054428d20800245122410000040000000020004000420000204101200620000010050080c1540000080008114210003cc0200610400801c0300640000630500880a40820400241010441000420a504001048008a5",
"miner": "0xb2930b35844a230f00e51431acae96fe543a0347",
"mixHash": "0xb1266ba0d3c68a5561e6f62a819d214d9eaa293312f674f3a44ad7fae5e6740d",
"nonce": "0x6b5afb9416a32721",
"number": "0x5bad53",
"parentHash": "0xd2f7edf95b79d2a7e994f698d1ea1737642de0bd49138d183bcc3d1ecf9792e4",
"receiptsRoot": "0xc2798ebd620a7dee020ba272d4396a60a68de6ce5f52b22770e9fee2e14ff15a",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x20d",
"stateRoot": "0x9a57583eeb63556158cdda05f188ff1dffa1a1cfde194d026f2719e69edf2a9d",
"timestamp": "0x5b541431",
"transactionsRoot": "0x11447f3cc960e33ecca21d2b1ca08b6b5a7e478c35920ad1159c9332c0f9332c",
"uncles": []
}
}