fetchTokenBalance method
- String address,
- ERC20Entity token
Fetch Token Balance
Implementation
Future<Amount> fetchTokenBalance(
String address,
ERC20Entity token,
) async {
final erc20Contract = ERC20Contract(
contractAddress: token.contractAddress,
rpc: this,
);
final balance = await erc20Contract.getBalance(address);
return Amount(value: balance, decimals: token.decimals);
}