The zks_getL1BatchBlockRange
API method is designed to provide the range of blocks within a specific zkSync network batch. Given a batch number, it returns the starting and ending block numbers in hexadecimal format.
Get your own node endpoint today
Start for free and elevate your app to production levels immediately. No credit card required.
Sign up with your GitHub, X, Google, or Microsoft account for immediate access.
Parameters
batch
— anL1BatchNumber
representing the batch number for which the block range is being requested.
Response
The response provides the starting and ending block numbers of the specified batch, returned as hexadecimal strings:
result
— the block range is returned as an array containing two elements: the starting and ending block numbers in hexadecimal format.
You can use the Chainstack EVM Swiss Army Knife to convert values.
Use case
A developer creating a security audit tool for DeFi applications on zkSync could use zks_getL1BatchBlockRange
to monitor and analyze transactions within specific batches. This enables timely detection of suspicious patterns or anomalies, enhancing the application's security by ensuring transactions align with expected behavior and regulatory compliance.
Try the zks_getL1BatchBlockRange
RPC method yourself
zks_getL1BatchBlockRange
RPC method yourself