getContractInfo method

Future<WasmContractInfo> getContractInfo(
  1. String contractAddress
)

Implementation

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

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

  throw Exception("");
}