Fetches the block object associated with the provided hash.
Parameters
DATA, 32 Bytes - Block Hash.Boolean- Returns full transaction details iftrue, or only hashes iffalse.
Return fields
When the block is found, result is a block object; otherwise it is null. The table below describes selected fields as returned on TRON. Quantities are encoded as 0x-prefixed hexadecimal values.
| Field | Meaning |
|---|---|
gasLimit | Sum of fee_limit across the block's transactions, in sun; not a block Energy limit |
gasUsed | Total Energy actually consumed by transactions in the block |
logsBloom | A fixed all-zero placeholder; it cannot be used to determine whether the block contains logs |
receiptsRoot | A fixed all-zero placeholder, not a root hash for verifying receipts |
When the second parameter is true, transactions contains transaction objects. For their field meanings, see eth_getTransactionByHash.
Example
Request
curl -X POST 'https://api.shasta.trongrid.io/jsonrpc' --data '{
"jsonrpc": "2.0",
"method": "eth_getBlockByHash",
"params": ["0x0000000000f9cc56243898cbe88685678855e07f51c5af91322c225ce3693868", false],
"id": 1
}'Response
{"jsonrpc":"2.0","id":1,"result":null}