From 99b8f8ad3bc46688955e3b547b402abfc061def2 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Thu, 5 May 2022 19:02:27 +0200 Subject: [PATCH] chore: move proto v1beta1 to v1 + update proto import paths --- CHANGELOG.md | 6 +++ .../leverage/{v1beta1 => v1}/genesis.proto | 4 +- proto/umee/leverage/{v1beta1 => v1}/gov.proto | 4 +- .../leverage/{v1beta1 => v1}/leverage.proto | 2 +- .../umee/leverage/{v1beta1 => v1}/query.proto | 42 +++++++++---------- proto/umee/leverage/{v1beta1 => v1}/tx.proto | 2 +- .../umee/oracle/{v1beta1 => v1}/genesis.proto | 4 +- .../umee/oracle/{v1beta1 => v1}/oracle.proto | 2 +- proto/umee/oracle/{v1beta1 => v1}/query.proto | 22 +++++----- proto/umee/oracle/{v1beta1 => v1}/tx.proto | 2 +- 10 files changed, 48 insertions(+), 42 deletions(-) rename proto/umee/leverage/{v1beta1 => v1}/genesis.proto (96%) rename proto/umee/leverage/{v1beta1 => v1}/gov.proto (88%) rename proto/umee/leverage/{v1beta1 => v1}/leverage.proto (99%) rename proto/umee/leverage/{v1beta1 => v1}/query.proto (89%) rename proto/umee/leverage/{v1beta1 => v1}/tx.proto (98%) rename proto/umee/oracle/{v1beta1 => v1}/genesis.proto (94%) rename proto/umee/oracle/{v1beta1 => v1}/oracle.proto (98%) rename proto/umee/oracle/{v1beta1 => v1}/query.proto (87%) rename proto/umee/oracle/{v1beta1 => v1}/tx.proto (98%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 166e3b28cb..9636cdd5dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,12 +50,18 @@ 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) chore: Move proto v1beta1 to v1. + ## [v2.0.1](https://github.com/umee-network/umee/releases/tag/v2.0.1) - 2022-04-25 ### Features + - [835](https://github.com/umee-network/umee/pull/835) Add miss counter query to oracle cli. ### Bug Fixes + - [829](https://github.com/umee-network/umee/pull/829) Fix `umeed tx leverage liquidate` command args ### Improvements diff --git a/proto/umee/leverage/v1beta1/genesis.proto b/proto/umee/leverage/v1/genesis.proto similarity index 96% rename from proto/umee/leverage/v1beta1/genesis.proto rename to proto/umee/leverage/v1/genesis.proto index dd1c60ddfc..dde1e18ea9 100644 --- a/proto/umee/leverage/v1beta1/genesis.proto +++ b/proto/umee/leverage/v1/genesis.proto @@ -1,9 +1,9 @@ syntax = "proto3"; -package umeenetwork.umee.leverage.v1beta1; +package umeenetwork.umee.leverage.v1; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; -import "umee/leverage/v1beta1/leverage.proto"; +import "umee/leverage/v1/leverage.proto"; option go_package = "github.com/umee-network/umee/v2/x/leverage/types"; diff --git a/proto/umee/leverage/v1beta1/gov.proto b/proto/umee/leverage/v1/gov.proto similarity index 88% rename from proto/umee/leverage/v1beta1/gov.proto rename to proto/umee/leverage/v1/gov.proto index 2462ff95f4..1cd35c2a24 100644 --- a/proto/umee/leverage/v1beta1/gov.proto +++ b/proto/umee/leverage/v1/gov.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package umeenetwork.umee.leverage.v1beta1; +package umeenetwork.umee.leverage.v1; import "gogoproto/gogo.proto"; -import "umee/leverage/v1beta1/leverage.proto"; +import "umee/leverage/v1/leverage.proto"; option go_package = "github.com/umee-network/umee/v2/x/leverage/types"; diff --git a/proto/umee/leverage/v1beta1/leverage.proto b/proto/umee/leverage/v1/leverage.proto similarity index 99% rename from proto/umee/leverage/v1beta1/leverage.proto rename to proto/umee/leverage/v1/leverage.proto index d36b3fecd0..fa586d4a61 100644 --- a/proto/umee/leverage/v1beta1/leverage.proto +++ b/proto/umee/leverage/v1/leverage.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package umeenetwork.umee.leverage.v1beta1; +package umeenetwork.umee.leverage.v1; import "gogoproto/gogo.proto"; diff --git a/proto/umee/leverage/v1beta1/query.proto b/proto/umee/leverage/v1/query.proto similarity index 89% rename from proto/umee/leverage/v1beta1/query.proto rename to proto/umee/leverage/v1/query.proto index 88b3cb2fb6..a9545bd75f 100644 --- a/proto/umee/leverage/v1beta1/query.proto +++ b/proto/umee/leverage/v1/query.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package umeenetwork.umee.leverage.v1beta1; +package umeenetwork.umee.leverage.v1; import "google/api/annotations.proto"; -import "umee/leverage/v1beta1/leverage.proto"; +import "umee/leverage/v1/leverage.proto"; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; @@ -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/v1beta1/registered_tokens"; + option (google.api.http).get = "/umee/leverage/v1/registered_tokens"; } // Params queries the parameters of the x/leverage module. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/umee/leverage/v1beta1/params"; + option (google.api.http).get = "/umee/leverage/v1/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/v1beta1/borrowed"; + option (google.api.http).get = "/umee/leverage/v1/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/v1beta1/borrowed_value"; + option (google.api.http).get = "/umee/leverage/v1/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/v1beta1/loaned"; + option (google.api.http).get = "/umee/leverage/v1/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/v1beta1/loaned_value"; + option (google.api.http).get = "/umee/leverage/v1/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/v1beta1/available_borrow"; + option (google.api.http).get = "/umee/leverage/v1/available_borrow"; } // BorrowAPY queries for the borrow APY of a specified denomination. rpc BorrowAPY(QueryBorrowAPYRequest) returns (QueryBorrowAPYResponse) { - option (google.api.http).get = "/umee/leverage/v1beta1/borrow_apy"; + option (google.api.http).get = "/umee/leverage/v1/borrow_apy"; } // LendAPY queries for the lend APY of a specified denomination. rpc LendAPY(QueryLendAPYRequest) returns (QueryLendAPYResponse) { - option (google.api.http).get = "/umee/leverage/v1beta1/lend_apy"; + option (google.api.http).get = "/umee/leverage/v1/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/v1beta1/market_size"; + option (google.api.http).get = "/umee/leverage/v1/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/v1beta1/token_market_size"; + option (google.api.http).get = "/umee/leverage/v1/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/v1beta1/reserve_amount"; + option (google.api.http).get = "/umee/leverage/v1/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/v1beta1/collateral_setting"; + option (google.api.http).get = "/umee/leverage/v1/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/v1beta1/collateral"; + option (google.api.http).get = "/umee/leverage/v1/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/v1beta1/collateral_value"; + option (google.api.http).get = "/umee/leverage/v1/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/v1beta1/exchange_rate"; + option (google.api.http).get = "/umee/leverage/v1/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/v1beta1/borrow_limit"; + option (google.api.http).get = "/umee/leverage/v1/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/v1beta1/liquidation_limit"; + option (google.api.http).get = "/umee/leverage/v1/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/v1beta1/liquidation_targets"; + option (google.api.http).get = "/umee/leverage/v1/liquidation_targets"; } } diff --git a/proto/umee/leverage/v1beta1/tx.proto b/proto/umee/leverage/v1/tx.proto similarity index 98% rename from proto/umee/leverage/v1beta1/tx.proto rename to proto/umee/leverage/v1/tx.proto index eac9296c60..4fb468ae38 100644 --- a/proto/umee/leverage/v1beta1/tx.proto +++ b/proto/umee/leverage/v1/tx.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package umeenetwork.umee.leverage.v1beta1; +package umeenetwork.umee.leverage.v1; import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; diff --git a/proto/umee/oracle/v1beta1/genesis.proto b/proto/umee/oracle/v1/genesis.proto similarity index 94% rename from proto/umee/oracle/v1beta1/genesis.proto rename to proto/umee/oracle/v1/genesis.proto index 4ea601aa8f..c5843dbd9a 100644 --- a/proto/umee/oracle/v1beta1/genesis.proto +++ b/proto/umee/oracle/v1/genesis.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package umeenetwork.umee.oracle.v1beta1; +package umeenetwork.umee.oracle.v1; import "gogoproto/gogo.proto"; -import "umee/oracle/v1beta1/oracle.proto"; +import "umee/oracle/v1/oracle.proto"; import "cosmos/base/v1beta1/coin.proto"; option go_package = "github.com/umee-network/umee/v2/x/oracle/types"; diff --git a/proto/umee/oracle/v1beta1/oracle.proto b/proto/umee/oracle/v1/oracle.proto similarity index 98% rename from proto/umee/oracle/v1beta1/oracle.proto rename to proto/umee/oracle/v1/oracle.proto index 2440b4d712..9f4f0df31b 100644 --- a/proto/umee/oracle/v1beta1/oracle.proto +++ b/proto/umee/oracle/v1/oracle.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package umeenetwork.umee.oracle.v1beta1; +package umeenetwork.umee.oracle.v1; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; diff --git a/proto/umee/oracle/v1beta1/query.proto b/proto/umee/oracle/v1/query.proto similarity index 87% rename from proto/umee/oracle/v1beta1/query.proto rename to proto/umee/oracle/v1/query.proto index d8ed51c75b..3fa204e89e 100644 --- a/proto/umee/oracle/v1beta1/query.proto +++ b/proto/umee/oracle/v1/query.proto @@ -1,9 +1,9 @@ syntax = "proto3"; -package umeenetwork.umee.oracle.v1beta1; +package umeenetwork.umee.oracle.v1; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; -import "umee/oracle/v1beta1/oracle.proto"; +import "umee/oracle/v1/oracle.proto"; import "cosmos/base/v1beta1/coin.proto"; option go_package = "github.com/umee-network/umee/v2/x/oracle/types"; @@ -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/v1beta1/denoms/exchange_rates/{denom}"; + option (google.api.http).get = "/umee/oracle/v1/denoms/exchange_rates/{denom}"; } // ActiveExchangeRates returns all active denoms rpc ActiveExchangeRates(QueryActiveExchangeRatesRequest) returns (QueryActiveExchangeRatesResponse) { - option (google.api.http).get = "/umee/oracle/v1beta1/denoms/active_exchange_rates"; + option (google.api.http).get = "/umee/oracle/v1/denoms/active_exchange_rates"; } // FeederDelegation returns feeder delegation of a validator rpc FeederDelegation(QueryFeederDelegationRequest) returns (QueryFeederDelegationResponse) { - option (google.api.http).get = "/umee/oracle/v1beta1/validators/{validator_addr}/feeder"; + option (google.api.http).get = "/umee/oracle/v1/validators/{validator_addr}/feeder"; } // MissCounter returns oracle miss counter of a validator rpc MissCounter(QueryMissCounterRequest) returns (QueryMissCounterResponse) { - option (google.api.http).get = "/umee/oracle/v1beta1/validators/{validator_addr}/miss"; + option (google.api.http).get = "/umee/oracle/v1/validators/{validator_addr}/miss"; } // AggregatePrevote returns an aggregate prevote of a validator rpc AggregatePrevote(QueryAggregatePrevoteRequest) returns (QueryAggregatePrevoteResponse) { - option (google.api.http).get = "/umee/oracle/v1beta1/validators/{validator_addr}/aggregate_prevote"; + option (google.api.http).get = "/umee/oracle/v1/validators/{validator_addr}/aggregate_prevote"; } // AggregatePrevotes returns aggregate prevotes of all validators rpc AggregatePrevotes(QueryAggregatePrevotesRequest) returns (QueryAggregatePrevotesResponse) { - option (google.api.http).get = "/umee/oracle/v1beta1/validators/aggregate_prevotes"; + option (google.api.http).get = "/umee/oracle/v1/validators/aggregate_prevotes"; } // AggregateVote returns an aggregate vote of a validator rpc AggregateVote(QueryAggregateVoteRequest) returns (QueryAggregateVoteResponse) { - option (google.api.http).get = "/umee/oracle/v1beta1/valdiators/{validator_addr}/aggregate_vote"; + option (google.api.http).get = "/umee/oracle/v1/valdiators/{validator_addr}/aggregate_vote"; } // AggregateVotes returns aggregate votes of all validators rpc AggregateVotes(QueryAggregateVotesRequest) returns (QueryAggregateVotesResponse) { - option (google.api.http).get = "/umee/oracle/v1beta1/validators/aggregate_votes"; + option (google.api.http).get = "/umee/oracle/v1/validators/aggregate_votes"; } // Params queries all parameters. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/umee/oracle/v1beta1/params"; + option (google.api.http).get = "/umee/oracle/v1/params"; } } diff --git a/proto/umee/oracle/v1beta1/tx.proto b/proto/umee/oracle/v1/tx.proto similarity index 98% rename from proto/umee/oracle/v1beta1/tx.proto rename to proto/umee/oracle/v1/tx.proto index a8da6299d2..c518ebcf04 100644 --- a/proto/umee/oracle/v1beta1/tx.proto +++ b/proto/umee/oracle/v1/tx.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package umeenetwork.umee.oracle.v1beta1; +package umeenetwork.umee.oracle.v1; import "gogoproto/gogo.proto";