Skip to main content

zks_getL1BatchBlockRange

Returns the range of blocks contained within a given batch.

Parameters

  • batch: (integer) [Required] The layer 1 batch number.

Response

The range of blocks contained within the specified batch. The range is given by the beginning/end block numbers in hexadecimal.

Example

Replace YOUR-API-KEY with an API key from your Infura dashboard.

Request

curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getL1BatchBlockRange", "params": [12345]}' \

Response

{
"jsonrpc": "2.0",
"result": ["0x116fec", "0x117015"],
"id": 1
}