eth_getBlockByHash

Fetches the block object associated with the provided hash.

Parameters

  1. DATA, 32 Bytes - Block Hash.
  2. Boolean - Returns full transaction details if true, or only hashes if false.

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.

FieldMeaning
gasLimitSum of fee_limit across the block's transactions, in sun; not a block Energy limit
gasUsedTotal Energy actually consumed by transactions in the block
logsBloomA fixed all-zero placeholder; it cannot be used to determine whether the block contains logs
receiptsRootA 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}