curl --request POST \
--url https://nd-363-550-219.p2pify.com/942aad90bb6a082676497030b81e40ba \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "zkevm_virtualBatchNumber",
"params": []
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": {}
}curl --request POST \
--url https://nd-363-550-219.p2pify.com/942aad90bb6a082676497030b81e40ba \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "zkevm_virtualBatchNumber",
"params": []
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": {}
}Polygon zkEVM API method that returns the current virtual batch number. In the Polygon zkEVM, transactions are grouped into batches. A virtual batch is a batch that is in the process of being created and has not yet been verified. The virtual batch number represents the next batch to be verified using zero-knowledge proofs.Documentation Index
Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
Use this file to discover all available pages before exploring further.
noneresult — the hexadecimal value of the latest virtual batch number on the Polygon zkEVM network.zkevm_virtualBatchNumber code examplesconst Web3 = require("web3");
const NODE_URL = "YOUR_CHAINSTACK_ENDPOINT";
const web3 = new Web3(NODE_URL);
web3.extend({
property: 'zkEVM',
methods: [{
name: 'virtualBatchNumber',
call: 'zkevm_virtualBatchNumber',
params: 0,
inputFormatter: null,
outputFormatter: null
}]
});
async function virtualBatchNumber() {
const output = await web3.zkEVM.virtualBatchNumber()
console.log(output)
}
virtualBatchNumber();
Was this page helpful?