Custom RPC
A standard interface for custom RPC methods.
Example of Custom RPC
string chain = "cronos";
string network = "mainnet"; // mainnet or testnet
string account = "WALLET_ADDRESS";
string rpc = "https://evm-dev.cronos.org"; // test: https://evm-dev-t3.cronos.org/
string balance = await EVM.BalanceOf(chain, network, account, rpc);
print(balance);Call Custom Contracts
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract AddTotal {
uint256 public myTotal = 0;
function addTotal(uint8 _myArg) public {
myTotal = myTotal + _myArg;
}
}lidLast updated
Was this helpful?