post https://api.infstones.com/theta/mainnet/
Returns information about a block by hash.
Parameters
Object Name | Required | Type | Detail |
---|---|---|---|
BLOCK HASH | ✅ | String | Hash of the block. |
SHOW TRANSACTION DETAILS | ✅ | Boolean | If set true , it returns the full transaction objects in the block; if set false , it returns only the transaction hashes in the block. |
"params": [
"0xe56b3a25c383129facc1143f5de7129121faefc586709eb698f7fa2297918f10",
false
]
Result
A block object, or null
if no block 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. |
transactions | Array | Array of transactions objects or array of transactions hashes, depending on the parameter value of SHOW TRANSACTION DETAILS |
transactionsRoot | String | The root of the transaction trie of the block. |
uncles | Array | Array of uncle hashes. |
Example
Request
curl <your-endpoint> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0xe56b3a25c383129facc1143f5de7129121faefc586709eb698f7fa2297918f10", false],"id":0}'
Return
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"number": "0x1285544",
"hash": "0xe56b3a25c383129facc1143f5de7129121faefc586709eb698f7fa2297918f10",
"parentHash": "0xb25af5b5ceeaf9c0ab5cc2ec727e6c1b22f3f51aef17447dd2b4352afaa9be28",
"timestamp": "0x63ffd4e7",
"miner": "0xe2408dff7a1f9bc247c803e43efa2f0a37b10ba6",
"transactionsRoot": "0x5c63359ec89561cd23e0d7bdd4feff300eb30bcc03e8c668bf31c2d516f64956",
"stateRoot": "0xcc9fce9eea52bee0de67b5c6e1e0c68a347fe0c052ff984fa169f814cb32663d",
"receiptsRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"sha3Uncles": "0x0000000000000000000000000000000000000000000000000000000000000000",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"difficulty": "0x0",
"totalDifficulty": "0x0",
"size": "0x3e8",
"gasLimit": "0x1312d00",
"gasUsed": "0x0",
"extraData": "0x",
"uncles": [],
"transactions": []
}
}