eth_getBlockByHash

Parameters

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

Returns

  • Object - The return value is a block object (see schema below) or null if the block does not exist. The object includes the following items:

    Item NameData TypeDescription
    numberQUANTITYBlock number.
    hashDATA, 32 BytesBlock hash.
    parentHashDATA, 32 BytesParent block hash.
    nonceQUANTITYThis field is not used.
    sha3UnclesDATA, 32 BytesSHA3 hash of the block's uncle's data.
    logsBloomDATA, 256 BytesBlock log Bloom filter.
    transactionsRootDATA, 32 BytesThe root of the transaction trie for the block.
    stateRootDATA, 32 BytesThe root of the final state trie for the block.
    receiptsRootDATA, 32 BytesThe root of the receipts trie for the block.
    minerDATA, 20 BytesThe address of the beneficiary who received the mining rewards.
    difficultyQUANTITYBlock difficulty (integer).
    totalDifficultyQUANTITYThe total difficulty of the chain up to this block, represented as an integer.
    extraDataDATAThe “extra data” of this block.
    sizeQUANTITYBlock size in bytes (integer).
    gasLimitQUANTITYThe maximum gas allowed in this block
    gasUsedQUANTITYTotal gas used by all transactions in this block.
    timestampQUANTITYBlock creation time (Unix timestamp in seconds).
    transactionsArrayArray of transaction objects or 32-byte hashes, contingent on the last input parameter.
    unclesArrayArray of uncle hashes.

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}