totalSupply method

Future<String> totalSupply(
  1. String totalSupply_
)

Gets the totalSupply of the specified address.

Implementation

Future<String> totalSupply(String totalSupply_) async {
  final EthereumAddress contractAddr = EthereumAddress.fromHex(totalSupply_);
  final contract = DeployedContract(
      ContractAbi.fromJson(abiString, 'XRC20'), contractAddr);
  final tokenTotalSupply = contract.function('totalSupply');

  final totalSupply = await client
      .call(contract: contract, function: tokenTotalSupply, params: []);
  return ('$totalSupply');
}