getTaxCap method

Future<double> getTaxCap(
  1. String denom
)

Implementation

Future<double> getTaxCap(String denom) async {
  var rootPath =
      "${TerraClientConfiguration.blockchainResourcePath}${CosmosBaseConstants.COSMOS_TREASURY_TAX_CAPS}/$denom";

  var response = await apiRequester.getAsync<TreasuryTaxCap>(rootPath);
  if (response.successful!) {
    var result = TreasuryTaxCap.fromJson(response.result!);
    return double.parse(result.tax_cap);
  }

  throw Exception("");
}