zkevm_getBatchByNumber

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 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

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