Skip to content

Commit

Permalink
refactor: remove proto getters (#1125)
Browse files Browse the repository at this point in the history
## Description

closes: #1114

---

### Author Checklist

_All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues._

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [x] added appropriate labels to the PR
- [x] targeted the correct branch (see [PR Targeting](https://github.com/umee-network/umee/blob/main/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed

### Reviewers Checklist

_All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items._

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
  • Loading branch information
robert-zaremba authored Jul 12, 2022
1 parent 80821ee commit 3a77adf
Show file tree
Hide file tree
Showing 20 changed files with 451 additions and 1,110 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
- [1113](https://github.com/umee-network/umee/pull/1113) Rename Amount field to Asset when sdk.Coin type in Msg proto.
- [1122](https://github.com/umee-network/umee/pull/1122) Rename MsgWithdrawAsset, MsgBorrowAsset, MsgRepayAsset, MsgAddCollateral, and MsgRemoveCollateral to MsgWithdraw, MsgBorrow, MsgRepay, MsgCollateralize, MsgDecollateralize.
- [1123](https://github.com/umee-network/umee/pull/1123) Shorten all leverage and oracle query structs by removing the Request suffix
- [1125](https://github.com/umee-network/umee/pull/1125) Refactor: remove proto getters in x/leverage and x/oracle proto types.

### Features

Expand Down
6 changes: 4 additions & 2 deletions proto/umee/leverage/v1/genesis.proto
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
syntax = "proto3";
package umee.leverage.v1;

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

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

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

option (gogoproto.goproto_getters_all) = false;

// GenesisState defines the x/leverage module's genesis state.
message GenesisState {
Params params = 1 [(gogoproto.nullable) = false];
Expand Down
2 changes: 2 additions & 0 deletions proto/umee/leverage/v1/gov.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import "umee/leverage/v1/leverage.proto";

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

option (gogoproto.goproto_getters_all) = false;

// UpdateRegistryProposal defines a governance proposal type where the token
// registry can be updated in the Umee capital facility. Note, the registry
// defined in the proposal replaces the current registry in its entirety.
Expand Down
2 changes: 2 additions & 0 deletions proto/umee/leverage/v1/leverage.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import "gogoproto/gogo.proto";

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

option (gogoproto.goproto_getters_all) = false;

// Params defines the parameters for the leverage module.
message Params {
option (gogoproto.goproto_stringer) = false;
Expand Down
4 changes: 3 additions & 1 deletion proto/umee/leverage/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import "cosmos/base/v1beta1/coin.proto";

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

option (gogoproto.goproto_getters_all) = false;

// Query defines the gRPC querier service.
service Query {
// RegisteredTokens queries for all the registered tokens.
Expand Down Expand Up @@ -489,4 +491,4 @@ message QueryTotalBorrowedResponse {
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false
];
}
}
2 changes: 2 additions & 0 deletions proto/umee/leverage/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import "gogoproto/gogo.proto";

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

option (gogoproto.goproto_getters_all) = false;

// Msg defines the x/leverage module's Msg service.
service Msg {
// Supply moves tokens from user balance to the module for lending or collateral.
Expand Down
2 changes: 2 additions & 0 deletions proto/umee/oracle/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import "umee/oracle/v1/oracle.proto";

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

option (gogoproto.goproto_getters_all) = false;

// GenesisState defines the oracle module's genesis state.
message GenesisState {
Params params = 1 [(gogoproto.nullable) = false];
Expand Down
2 changes: 2 additions & 0 deletions proto/umee/oracle/v1/oracle.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import "gogoproto/gogo.proto";

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

option (gogoproto.goproto_getters_all) = false;

// Params defines the parameters for the oracle module.
message Params {
option (gogoproto.equal) = true;
Expand Down
2 changes: 2 additions & 0 deletions proto/umee/oracle/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import "cosmos/base/v1beta1/coin.proto";

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

option (gogoproto.goproto_getters_all) = false;

// Query defines the gRPC querier service.
service Query {
// ExchangeRates returns exchange rates of all denoms,
Expand Down
2 changes: 2 additions & 0 deletions proto/umee/oracle/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import "gogoproto/gogo.proto";

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

option (gogoproto.goproto_getters_all) = false;

// Msg defines the oracle Msg service.
service Msg {
// AggregateExchangeRatePrevote defines a method for submitting an aggregate
Expand Down
190 changes: 39 additions & 151 deletions x/leverage/types/genesis.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions x/leverage/types/gov.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3a77adf

Please sign in to comment.