📍ftm.getBlock()
Description: Retrieves information about a specific block by block number or block hash.
Parameters
Name
Type
Description
BigNumber
integer/string
The block number or block hash.
Boolean
boolean
(optional, default: false)
If true
, returns full transaction objects; if false
, returns only transaction hashes.
Function
function
(optional)
Optional callback function, where the first parameter is an error object and the second is the result.
Returns
Type
Description
object
Contains detailed block information.
Response Object Structure
Field
Type
Description
number
number
The block number. null
if a pending block.
hash
string
(32 Bytes)
Hash of the block. null
if a pending block.
parentHash
string
(32 Bytes)
Hash of the parent block.
nonce
string
(8 Bytes)
Hash of the generated proof-of-work. null
if a pending block.
sha3Uncles
string
(32 Bytes)
SHA3 hash of the uncles data in the block.
logsBloom
string
(256 Bytes)
Bloom filter for logs in the block. null
if a pending block.
transactionsRoot
string
(32 Bytes)
Root of the transaction trie for this block.
stateRoot
string
(32 Bytes)
Root of the final state trie of this block.
miner
string
Address of the beneficiary receiving mining rewards.
difficulty
string
Difficulty level for this block.
totalDifficulty
string
Total difficulty of the chain until this block.
extraData
string
Extra data field of the block.
size
number
Size of the block in bytes.
gasLimit
number
Maximum gas allowed in this block.
gasUsed
number
Total gas used by all transactions in this block.
timestamp
number
Unix timestamp of when the block was collated.
transactions
array
Array of transaction objects or transaction hashes (based on Boolean
parameter).
uncles
array
Array of uncle block hashes.
Last updated