Skip to main content

chain_getBlock RPC Method

Retrieve both the header and body components of a relay chain block.

Updated on
Oct 4, 2023

chain_getBlock RPC Method

Parameters

BlockHash
string
The hash of the block where this transaction was in

Returns

result
object
An object containing information about the requested block:
block
object
An object representing the block and its components
header
object
The header of the block, including various metadata
parentHash
string
The hash of the parent block, which is the previous block in the chain
number
string
The block number or height in the blockchain sequence
stateRoot
string
The root hash of the state trie after applying the block's transactions
extrinsicsRoot
string
The root hash of the trie containing the extrinsics in the block
digest
array
The additional data attached to the block, such as logs
logs
string
An array of logs associated with the block's digest
extrinsics
array
An array of extrinsics (transactions) included in the block
justifications
array
An array of justifications (proof of validity) for the block, if available
Request
1
curl https://docs-demo.dot-mainnet.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{"method":"chain_getBlock","params":[],"id":1,"jsonrpc":"2.0"}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free