API Reference

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

// Retrieve the number of decimals for the ERC20 token using the getDecimals() method
// Parameters: contractAddress - the address of the ERC20 contract
BigInteger decimals = erc20Helper.getDecimals("0x92eFDFa35c75B259375eBe0F84ee1d95db0489b6");

// Print the number of decimals
System.out.println(decimals.toString());
// Create an instance of Trc20Helper with the specified RPC node URL
Trc20Helper trc20Helper = new Trc20Helper("JSON_RPC_URL");

// Retrieve the number of decimals for the TRC20 token using the getDecimals() method
// Parameters: contractAddress - the address of the TRC20 contract
BigInteger decimals = trc20Helper.getDecimals("TEYKWmKvdCHX2NuX4tVmhxdN4P3PVjyMcu");

// Print the number of decimals
System.out.println(decimals.toString());