getCodeInfo method

Future<WasmCodeInfo> getCodeInfo(
  1. double codeID
)

Implementation

Future<WasmCodeInfo> getCodeInfo(double codeID) async {
  String rootPath =
      "${TerraClientConfiguration.blockchainResourcePath}${CosmosBaseConstants.COSMOS_WASM_CODES}/$codeID";

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

  throw Exception("");
}