post https://api.infstones.com/theta/mainnet/
Returns information about the 'Uncle' of a block by hash and the Uncle index position.
Parameters
Object Name | Required | Type | Detail |
---|---|---|---|
BLOCK HASH | ✅ | String | Hash of the block. |
UNCLE INDEX POSITION | ✅ | String | A hex code of an integer that represents the uncle's index position. |
"params": [
"0x4e5f091771db9bc338fdcdbbdae56ea559efcf47d1b10bf4039ef70ee5f1f735",
"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 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_getUncleByBlockHashAndIndex","params": ["0x4e5f091771db9bc338fdcdbbdae56ea559efcf47d1b10bf4039ef70ee5f1f735","0x0"],"id":1}'
Return
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"number": "0x0",
"hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp": "0x0",
"miner": "0x0000000000000000000000000000000000000000",
"transactionsRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"stateRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"receiptsRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "",
"sha3Uncles": "0x0000000000000000000000000000000000000000000000000000000000000000",
"logsBloom": "",
"difficulty": "0x0",
"totalDifficulty": "0x0",
"size": "0x0",
"gasLimit": "0x0",
"gasUsed": "0x0",
"extraData": "",
"uncles": null,
"transactions": null
}
}