getContractQuery method

Future<String> getContractQuery(
  1. String contractAddress
)

Implementation

Future<String> getContractQuery(String contractAddress) async {
  String rootPath =
      "${TerraClientConfiguration.blockchainResourcePath}${CosmosBaseConstants.COSMOS_WASM_CONTRACTS}/$contractAddress/store";

  var response = await apiRequester.getAsync<WasmContainer>(rootPath);
  if (response.successful!) {
    var result = WasmContainer.fromJson(response.result!);
    return result.query_result;
  }

  throw Exception("");
}