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_isBlockVirtualized",
"params": [
"130000"
]
}
'{
"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_isBlockVirtualized",
"params": [
"130000"
]
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": {}
}blockNumber — (string) the block number to check if it has been virtualized, encoded as a hexadecimal value.result — (boolean) true if the specified block has been virtualized, and false otherwise.zkevm_isBlockVirtualized code examplesconst Web3 = require("web3");
const NODE_URL = "YOUR_CHAINSTACK_ENDPOINT";
const web3 = new Web3(NODE_URL);
web3.extend({
property: 'zkEVM',
methods: [{
name: 'isBlockVirtualized',
call: 'zkevm_isBlockVirtualized',
params: 1,
inputFormatter: null,
outputFormatter: null
}]
});
async function isBlockVirtualized(blockId) {
const block = await web3.zkEVM.isBlockVirtualized(blockId)
console.log(block)
}
isBlockVirtualized("0xd29e");
Was this page helpful?