getFeederAddress method

Future<String> getFeederAddress(
  1. String validator
)

Implementation

Future<String> getFeederAddress(String validator) async {
  var rootPath =
      "${TerraClientConfiguration.blockchainResourcePath}${CosmosBaseConstants.COSMOS_ORACLE_VALIDATORS}/$validator/${CosmosOracleConstants.FEEDER}";

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

  throw Exception("");
}