Skip to main content
Defined in the Ethereum JSON-RPC Specification
Returns information about a block by block number.

Parameters

blockParameter
string
required
Integer block number, or the string “latest”, “earliest”, “pending”, “safe” or “finalized”.
fullTransactionObjects
boolean
required
If true, returns the full transaction objects; if false, returns only the hashes of the transactions.

Returns

result
object
A block object, or null when no block was found.

Error Handling

Block parameter tags: “latest” (most recent block), “earliest” (genesis block), “pending” (next block to be mined), “safe” and “finalized” (post-merge Ethereum blocks).