curl --request POST \
--url https://nd-995-911-243.p2pify.com/afb8312f3710a5bc469f4c87cad3a2e4 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "zks_getL1BatchBlockRange",
"params": [
443314
]
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"startBlock": 123,
"endBlock": 123
}
}
curl --request POST \
--url https://nd-995-911-243.p2pify.com/afb8312f3710a5bc469f4c87cad3a2e4 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "zks_getL1BatchBlockRange",
"params": [
443314
]
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"startBlock": 123,
"endBlock": 123
}
}
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.
batch
— an L1BatchNumber
representing the batch number for which the block range is being requested.result
— the block range is returned as an array containing two elements: the starting and ending block numbers in hexadecimal format.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.Successful response
The response is of type object
.