Skip to content

Commit

Permalink
Revert "chore: Move proto v1beta1 to v1 (#870) (#875)"
Browse files Browse the repository at this point in the history
This reverts commit baa5ab5.
  • Loading branch information
toteki committed May 10, 2022
1 parent 4b52f4d commit 3eb3ea1
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 46 deletions.
4 changes: 0 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ Ref: https://keepachangelog.com/en/1.0.0/

- [866](https://github.com/umee-network/umee/pull/866) Make the x/oracle keeper's GetExchangeRateBase method more efficient.

### API Breaking

- [870](https://github.com/umee-network/umee/pull/870) Move proto v1beta1 to v1.

## [v2.0.1](https://github.com/umee-network/umee/releases/tag/v2.0.1) - 2022-04-25

### Features
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
syntax = "proto3";
package umeenetwork.umee.leverage.v1;
package umeenetwork.umee.leverage.v1beta1;

import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";
import "umee/leverage/v1/leverage.proto";
import "umee/leverage/v1beta1/leverage.proto";

option go_package = "github.com/umee-network/umee/v2/x/leverage/types";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
syntax = "proto3";
package umeenetwork.umee.leverage.v1;
package umeenetwork.umee.leverage.v1beta1;

import "gogoproto/gogo.proto";
import "umee/leverage/v1/leverage.proto";
import "umee/leverage/v1beta1/leverage.proto";

option go_package = "github.com/umee-network/umee/v2/x/leverage/types";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
syntax = "proto3";
package umeenetwork.umee.leverage.v1;
package umeenetwork.umee.leverage.v1beta1;

import "gogoproto/gogo.proto";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
syntax = "proto3";
package umeenetwork.umee.leverage.v1;
package umeenetwork.umee.leverage.v1beta1;

import "google/api/annotations.proto";
import "umee/leverage/v1/leverage.proto";
import "umee/leverage/v1beta1/leverage.proto";
import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";

Expand All @@ -12,113 +12,113 @@ option go_package = "github.com/umee-network/umee/v2/x/leverage/types";
service Query {
// RegisteredTokens queries for all the registered tokens.
rpc RegisteredTokens(QueryRegisteredTokens) returns (QueryRegisteredTokensResponse) {
option (google.api.http).get = "/umee/leverage/v1/registered_tokens";
option (google.api.http).get = "/umee/leverage/v1beta1/registered_tokens";
}

// Params queries the parameters of the x/leverage module.
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/umee/leverage/v1/params";
option (google.api.http).get = "/umee/leverage/v1beta1/params";
}

// Borrowed queries for the borrowed amount of a user by token denomination.
// If the denomination is not supplied, the total for each borrowed token is
// returned.
rpc Borrowed(QueryBorrowedRequest) returns (QueryBorrowedResponse) {
option (google.api.http).get = "/umee/leverage/v1/borrowed";
option (google.api.http).get = "/umee/leverage/v1beta1/borrowed";
}

// BorrowedValue queries for the usd value of the borrowed amount of a user
// by token denomination. If the denomination is not supplied, the sum across
// all borrowed tokens is returned.
rpc BorrowedValue(QueryBorrowedValueRequest) returns (QueryBorrowedValueResponse) {
option (google.api.http).get = "/umee/leverage/v1/borrowed_value";
option (google.api.http).get = "/umee/leverage/v1beta1/borrowed_value";
}

// Loaned queries for the amount of tokens loaned by a user by denomination.
// If the denomination is not supplied, the total for each loaned token is
// returned.
rpc Loaned(QueryLoanedRequest) returns (QueryLoanedResponse) {
option (google.api.http).get = "/umee/leverage/v1/loaned";
option (google.api.http).get = "/umee/leverage/v1beta1/loaned";
}

// LoanedValue queries for the USD value loaned by a user by token
// denomination. If the denomination is not supplied, the sum across all
// loaned tokens is returned.
rpc LoanedValue(QueryLoanedValueRequest) returns (QueryLoanedValueResponse) {
option (google.api.http).get = "/umee/leverage/v1/loaned_value";
option (google.api.http).get = "/umee/leverage/v1beta1/loaned_value";
}

// AvailableBorrow queries for the available amount to borrow of a specified denomination.
rpc AvailableBorrow(QueryAvailableBorrowRequest) returns (QueryAvailableBorrowResponse) {
option (google.api.http).get = "/umee/leverage/v1/available_borrow";
option (google.api.http).get = "/umee/leverage/v1beta1/available_borrow";
}

// BorrowAPY queries for the borrow APY of a specified denomination.
rpc BorrowAPY(QueryBorrowAPYRequest) returns (QueryBorrowAPYResponse) {
option (google.api.http).get = "/umee/leverage/v1/borrow_apy";
option (google.api.http).get = "/umee/leverage/v1beta1/borrow_apy";
}

// LendAPY queries for the lend APY of a specified denomination.
rpc LendAPY(QueryLendAPYRequest) returns (QueryLendAPYResponse) {
option (google.api.http).get = "/umee/leverage/v1/lend_apy";
option (google.api.http).get = "/umee/leverage/v1beta1/lend_apy";
}

// MarketSize queries for the Market Size in USD of a specified denomination, which
// is the USD value of total tokens loaned by all users plus borrow interest owed
// by all users.
rpc MarketSize(QueryMarketSizeRequest) returns (QueryMarketSizeResponse) {
option (google.api.http).get = "/umee/leverage/v1/market_size";
option (google.api.http).get = "/umee/leverage/v1beta1/market_size";
}

// TokenMarketSize queries for the Market Size in base tokens of a specified denomination,
// which is the total tokens loaned by all users plus borrow interest owed by all users.
rpc TokenMarketSize(QueryTokenMarketSizeRequest) returns (QueryTokenMarketSizeResponse) {
option (google.api.http).get = "/umee/leverage/v1/token_market_size";
option (google.api.http).get = "/umee/leverage/v1beta1/token_market_size";
}

// ReserveAmount queries for the amount reserved of a specified denomination.
// If the token is not valid, the reserved amount is zero.
rpc ReserveAmount(QueryReserveAmountRequest) returns (QueryReserveAmountResponse) {
option (google.api.http).get = "/umee/leverage/v1/reserve_amount";
option (google.api.http).get = "/umee/leverage/v1beta1/reserve_amount";
}

// CollateralSetting queries a borrower's collateral setting (enabled or disabled)
// for a specified uToken denomination.
rpc CollateralSetting(QueryCollateralSettingRequest) returns (QueryCollateralSettingResponse) {
option (google.api.http).get = "/umee/leverage/v1/collateral_setting";
option (google.api.http).get = "/umee/leverage/v1beta1/collateral_setting";
}

// Collateral queries the collateral amount of a user by token denomination.
// If the denomination is not supplied, all of the user's collateral tokens
// are returned.
rpc Collateral(QueryCollateralRequest) returns (QueryCollateralResponse) {
option (google.api.http).get = "/umee/leverage/v1/collateral";
option (google.api.http).get = "/umee/leverage/v1beta1/collateral";
}

// CollateralValue queries for the total USD value of a user's collateral, or
// the USD value held as a given base asset's associated uToken denomination.
rpc CollateralValue(QueryCollateralValueRequest) returns (QueryCollateralValueResponse) {
option (google.api.http).get = "/umee/leverage/v1/collateral_value";
option (google.api.http).get = "/umee/leverage/v1beta1/collateral_value";
}

// ExchangeRate queries the uToken exchange rate of a given uToken denomination.
rpc ExchangeRate(QueryExchangeRateRequest) returns (QueryExchangeRateResponse) {
option (google.api.http).get = "/umee/leverage/v1/exchange_rate";
option (google.api.http).get = "/umee/leverage/v1beta1/exchange_rate";
}

// BorrowLimit queries the borrow limit in USD of a given borrower.
rpc BorrowLimit(QueryBorrowLimitRequest) returns (QueryBorrowLimitResponse) {
option (google.api.http).get = "/umee/leverage/v1/borrow_limit";
option (google.api.http).get = "/umee/leverage/v1beta1/borrow_limit";
}

// LiquidationLimit queries the limit in USD above which a given borrower is eligible for liquidation.
rpc LiquidationLimit(QueryLiquidationLimitRequest) returns (QueryLiquidationLimitResponse) {
option (google.api.http).get = "/umee/leverage/v1/liquidation_limit";
option (google.api.http).get = "/umee/leverage/v1beta1/liquidation_limit";
}

// LiquidationTargets queries a list of all borrower addresses eligible for liquidation.
rpc LiquidationTargets(QueryLiquidationTargetsRequest) returns (QueryLiquidationTargetsResponse) {
option (google.api.http).get = "/umee/leverage/v1/liquidation_targets";
option (google.api.http).get = "/umee/leverage/v1beta1/liquidation_targets";
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
syntax = "proto3";
package umeenetwork.umee.leverage.v1;
package umeenetwork.umee.leverage.v1beta1;

import "cosmos/base/v1beta1/coin.proto";
import "gogoproto/gogo.proto";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
syntax = "proto3";
package umeenetwork.umee.oracle.v1;
package umeenetwork.umee.oracle.v1beta1;

import "gogoproto/gogo.proto";
import "umee/oracle/v1/oracle.proto";
import "umee/oracle/v1beta1/oracle.proto";
import "cosmos/base/v1beta1/coin.proto";

option go_package = "github.com/umee-network/umee/v2/x/oracle/types";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
syntax = "proto3";
package umeenetwork.umee.oracle.v1;
package umeenetwork.umee.oracle.v1beta1;

import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
syntax = "proto3";
package umeenetwork.umee.oracle.v1;
package umeenetwork.umee.oracle.v1beta1;

import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "umee/oracle/v1/oracle.proto";
import "umee/oracle/v1beta1/oracle.proto";
import "cosmos/base/v1beta1/coin.proto";

option go_package = "github.com/umee-network/umee/v2/x/oracle/types";
Expand All @@ -13,47 +13,47 @@ service Query {
// ExchangeRates returns exchange rates of all denoms,
// or, if specified, returns a single denom
rpc ExchangeRates(QueryExchangeRatesRequest) returns (QueryExchangeRatesResponse) {
option (google.api.http).get = "/umee/oracle/v1/denoms/exchange_rates/{denom}";
option (google.api.http).get = "/umee/oracle/v1beta1/denoms/exchange_rates/{denom}";
}

// ActiveExchangeRates returns all active denoms
rpc ActiveExchangeRates(QueryActiveExchangeRatesRequest) returns (QueryActiveExchangeRatesResponse) {
option (google.api.http).get = "/umee/oracle/v1/denoms/active_exchange_rates";
option (google.api.http).get = "/umee/oracle/v1beta1/denoms/active_exchange_rates";
}

// FeederDelegation returns feeder delegation of a validator
rpc FeederDelegation(QueryFeederDelegationRequest) returns (QueryFeederDelegationResponse) {
option (google.api.http).get = "/umee/oracle/v1/validators/{validator_addr}/feeder";
option (google.api.http).get = "/umee/oracle/v1beta1/validators/{validator_addr}/feeder";
}

// MissCounter returns oracle miss counter of a validator
rpc MissCounter(QueryMissCounterRequest) returns (QueryMissCounterResponse) {
option (google.api.http).get = "/umee/oracle/v1/validators/{validator_addr}/miss";
option (google.api.http).get = "/umee/oracle/v1beta1/validators/{validator_addr}/miss";
}

// AggregatePrevote returns an aggregate prevote of a validator
rpc AggregatePrevote(QueryAggregatePrevoteRequest) returns (QueryAggregatePrevoteResponse) {
option (google.api.http).get = "/umee/oracle/v1/validators/{validator_addr}/aggregate_prevote";
option (google.api.http).get = "/umee/oracle/v1beta1/validators/{validator_addr}/aggregate_prevote";
}

// AggregatePrevotes returns aggregate prevotes of all validators
rpc AggregatePrevotes(QueryAggregatePrevotesRequest) returns (QueryAggregatePrevotesResponse) {
option (google.api.http).get = "/umee/oracle/v1/validators/aggregate_prevotes";
option (google.api.http).get = "/umee/oracle/v1beta1/validators/aggregate_prevotes";
}

// AggregateVote returns an aggregate vote of a validator
rpc AggregateVote(QueryAggregateVoteRequest) returns (QueryAggregateVoteResponse) {
option (google.api.http).get = "/umee/oracle/v1/valdiators/{validator_addr}/aggregate_vote";
option (google.api.http).get = "/umee/oracle/v1beta1/valdiators/{validator_addr}/aggregate_vote";
}

// AggregateVotes returns aggregate votes of all validators
rpc AggregateVotes(QueryAggregateVotesRequest) returns (QueryAggregateVotesResponse) {
option (google.api.http).get = "/umee/oracle/v1/validators/aggregate_votes";
option (google.api.http).get = "/umee/oracle/v1beta1/validators/aggregate_votes";
}

// Params queries all parameters.
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/umee/oracle/v1/params";
option (google.api.http).get = "/umee/oracle/v1beta1/params";
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
syntax = "proto3";
package umeenetwork.umee.oracle.v1;
package umeenetwork.umee.oracle.v1beta1;

import "gogoproto/gogo.proto";

Expand Down

0 comments on commit 3eb3ea1

Please sign in to comment.