getTaxCaps method

Future<List<Coin>> getTaxCaps()

Implementation

Future<List<Coin>> getTaxCaps() async {
  var rootPath =
      "${TerraClientConfiguration.blockchainResourcePath}${CosmosBaseConstants.COSMOS_TREASURY_TAX_CAPS}";

  var response = await apiRequester.getAsync<TreasuryTaxCap>(rootPath);
  if (response.successful!) {
    var result = TreasuryTaxCap.fromJson(response.result!);
    return result.tax_caps
        .map((w) => Coin(w.denom, double.parse(w.tax_cap)))
        .toList();
  }

  throw Exception("");
}