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_verifiedBatchNumber",
"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_verifiedBatchNumber",
"params": []
}'
{
"jsonrpc": "<string>",
"id": 123,
"result": {}
}
none
result
— the hexadecimal value of the latest verified batch number that has been added to the Polygon zkEVM network.zkevm_verifiedBatchNumber
code examplesconst Web3 = require("web3");
const NODE_URL = "YOUR_CHAINSTACK_ENDPOINT";
const web3 = new Web3(NODE_URL);
web3.extend({
property: 'zkEVM',
methods: [{
name: 'verifiedBatchNumber',
call: 'zkevm_verifiedBatchNumber',
params: 0,
inputFormatter: null,
outputFormatter: null
}]
});
async function verifiedBatchNumber() {
const output = await web3.zkEVM.verifiedBatchNumber()
console.log(output)
}
verifiedBatchNumber();
Returns the current verified batch number.
The response is of type object
.
Was this page helpful?