eth_getBlock
Returns block with given number
Parameters
The block number or block hash. Or the string
"earliest"
,"latest"
or"pending"
as in the default block parameter.(optional, default
false
) If specifiedtrue
, the returned block will contain all transactions as objects. Iffalse
it will only contains the transaction hashes.(optional) Optional callback, returns an error object as first parameter and the result as second.
Returns
The block object:
number
: The block number.null
if a pending block.
hash
: Hash of the block.null
if a pending block.
parentHash
: Hash of the parent block
sha3Uncles
: SHA3 of the uncles data in the block.
logsBloom
: The bloom filter for the logs of the block.null
if a pending block.
transactionsRoot
: The root of the transaction trie of the block.
stateRoot
: The root of the final state trie of the block.
miner
: The address of the beneficiary to whom the mining rewards were given.
difficulty
: Integer of the difficulty for this block.
totalDifficulty
: Integer of the total difficulty of the chain until this block.
extraData
: The βextra dataβ field of this block.
size
: Integer the size of this block in bytes.
gasLimit
: The maximum gas allowed in this block.
gasUsed
: The total used gas by all transactions in this block.
timestamp
: The unix timestamp for when the block was collated.
transactions
: Array of transaction objects, or 32 Bytes transaction hashes depending on thereturnTransactionObjects
parameter.
uncles
: Array of uncle hashes.author οΌ
receiptsRoot οΌ
sealFields οΌ
Example
Last updated