Returns information about a specific batch in the ZK-EVM layer, based on its batch number.
Supported on Polygon zkEVM (mainnet) only.
Parameters
BatchNumber/Tag
- string - The batch number or tag for which the information is to be retrieved
Returns
number
- The current block number in hexadecimal formatcoinbase
- The address of the current block minerstateRoot
- The root hash of the current state trieglobalExitRoot
- The root hash of the global exit queueaccInputHash
- The hash of the accumulated input datatimestamp
- The timestamp of the current block in hexadecimal formatsendSequencesTxHash
- The transaction hash of the most recent send sequenceverifyBatchTxHash
- The transaction hash of the most recent batch verificationtransactions
- An array of transactions included in the current block
API Endpoint
The format of a polygon-zkevm-rpc API endpoint is
https://open-platform.nodereal.io/{{apiKey}}/polygon-zkevm-rpc/
Here is an example:
https://open-platform.nodereal.io/4c0a1c23661a4e26bcbcwed461e34ea9/polygon-zkevm-rpc/
Example
Request
curl https://open-platform.nodereal.io/{{apiKey}}/polygon-zkevm-rpc/ \
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"zkevm_getBatchByNumber","params":[],"id":1,"jsonrpc":"2.0"}'
Result