getBalance method
Gets the balance of the account with the specified address.
This function allows specifying a custom block mined in the past to get historical data. By default, BlockNum.current will be used.
Implementation
Future<EtherAmount> getBalance(EthereumAddress address, {BlockNum? atBlock}) {
final blockParam = _getBlockParam(atBlock);
return makeRPCCall<String>('eth_getBalance', [address.hex, blockParam])
.then((data) {
return EtherAmount.fromBigInt(EtherUnit.wei, hexToInt(data));
});
}