API Reference

// Create an instance of Erc20Helper with the specified RPC node URL
Erc20Helper erc20Helper = new Erc20Helper("JSON_RPC_URL");

// Retrieve the account balance using the getBalance() method
// Parameters: accountAddress - the address of the account
//            contractAddress - the address of the ERC20 contract
BigInteger balance = erc20Helper.getBalance("accountAddress", "contractAddress");

// Print the account balance
System.out.println(balance.toString());
// Create an instance of Trc20Helper with the specified RPC node URL
Trc20Helper trc20Helper = new Trc20Helper("https://api.shasta.trongrid.io/jsonrpc");

// Retrieve the account balance using the getBalance() method
// Parameters: accountAddress - the address of the account
//            contractAddress - the address of the TRC20 contract
BigInteger balance = trc20Helper.getBalance("TEYKWmKvdCHX2NuX4tVmhxdN4P3PVjyMcu", "TUxNbLNpNxQafkHSMTUQf7AqdasdgeDSyp");

// Print the account balance
System.out.println(balance.toString());