getBalance method

Future<BigInt> getBalance(
  1. String address, [
  2. dynamic blockTag
])

Returns the balance of address as of the blockTag.


final balance = await getBalance('0xfooBar');

print(balance); // 10000000000000
print(balance is BigInt); // true

Implementation

Future<BigInt> getBalance(String address, [dynamic blockTag]) => call<BigInt>(
      'getBalance',
      blockTag != null ? [address, blockTag] : [address],
    );