Custom Functions
Custom Functions allow you to customize queries that can be sent simultaneously to all EVM chains, enhancing your EVM experience.
Use our variables to customize EVM Network for your own experience. For example:
async function getAllBlockNumber() {
for (var s=0;s<chain_id.length;s++) {
var currentChainId=chain_id[s];
var web3 = new Web3(chain_rpc[currentChainId]);
var blockNumber = await web3.eth.getBlockNumber();
console.log(chain_name[currentChainId] + ":" + blockNumber)
}
}
>> Ethereum:17651907
>> BNB Chain:29794808
>> Arbitrum:109240747
>> Polygon:44846390
>> Optimism:106627640
...
The above function provides you with the block numbers of all EVM chains in order.
Customize EVM Network for your needs. You can perform simultaneous fund transfers, deploy contracts, and much more across all EVM chains. Don't need all EVM chains? You can customize it with EVM variables for the chains you specify.
async function myEVMFunction() {
for (var s=0;s<chain_id.length;s++) {
var currentChainId=chain_id[s];
var web3 = new Web3(chain_rpc[currentChainId]);
/* YOUR CODES...
*/
}
}
Try your own functions today!
Last updated