post https://api.infstones.com/bsc/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": [
"0xf97a55",
"0x0"
]
Result
A block object, or null
when no block uncle 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 used gas 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": ["0xf97a55","0x0"],"id":1}'
Return
{
"id": 1,
"jsonrpc": "2.0",
"result": null
}