Skip to main content

zkevm_getBatchByNumber RPC Method

Returns information about a specific batch in the ZK-EVM layer, based on its batch number.

Updated on
Nov 2, 2023

zkevm_getBatchByNumber RPC Method

Parameters

batchNumber/Tag
string
REQUIRED
The batch number or tag for which the information is to be retrieved

Returns

number
The current block number in hexadecimal format
coinbase
The address of the current block miner
stateRoot
The root hash of the current state trie
globalExitRoot
The root hash of the global exit queue
accInputHash
The hash of the accumulated input data
timestamp
The timestamp of the current block in hexadecimal format
sendSequencesTxHash
The transaction hash of the most recent send sequence
verifyBatchTxHash
The transaction hash of the most recent batch verification
transactions
An array of transactions included in the current block
Request
1
curl https://docs-demo.zkevm-mainnet.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{"method":"zkevm_getBatchByNumber","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