Skip to main content

zkevm_getBatchByNumber

Returns information about the batch identified by the provided batch number or tag.

Returns information about the batch identified by the provided batch number or tag.

Parameters

  • batchNumber : (string) - The batch number (in hex) or batch tag

Returns

  • (object)
    • number : (string) - The batch number.
    • coinbase : (string) - The coinbase address.
    • stateRoot : (string) - The state root.
    • globalExitRoot : (string) - The global exit root.
    • localExitRoot : (string) - The local exit root.
    • accInputHash : (string) - The accumulated input hash.
    • timestamp : (string) - The timestamp.
    • sendSequencesTxHash : (string) - The send sequences transaction hash.
    • verifyBatchTxHash : (string) - The verify batch transaction hash.
    • transactions : (array[string]) - The transactions.

Example

Request

curl --location 'https://polygon-zkevm-mainnet.blastapi.io/<project-id>' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc":"2.0",
"method":"zkevm_getBatchByNumber",
"params":["0x0"],
"id":33
}'

Result

{
"jsonrpc": "2.0",
"id": 33,
"result": {
"number": "0x0",
"coinbase": "0x0000000000000000000000000000000000000000",
"stateRoot": "0x13a14c4a8288e782863d7ce916d224546c69dc428fbfa7115a0cc33a27a05b26",
"globalExitRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"mainnetExitRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"rollupExitRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"localExitRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"accInputHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp": "0x63fe2c8c",
"sendSequencesTxHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"verifyBatchTxHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"transactions": null
}
}