totalSupply method

Future<BigInt> totalSupply(
  1. String denom, {
  2. Duration? timeout,
})

Implementation

Future<BigInt> totalSupply(String denom, {Duration? timeout}) async {
  final result = await query(
    QuerySupplyOfRequest(denom: denom),
    timeout: timeout,
  );
  final amount = result.amount?.amount;
  if (amount == null) return BigInt.zero;
  return BigintUtils.parse(amount);
}