-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description Closes: #XXXX. This PR implements the `x/fees` module that allows governance to set minimum fees on messages. Depends-On: #816 Depends-On: #817 --- ### 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... - [ ] 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 - [ ] targeted the correct branch (see [PR Targeting](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] followed the guidelines for [building modules](https://docs.cosmos.network/v0.44/building-modules/intro.html) - [ ] included the necessary unit and integration [tests](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] 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... - [x] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [x] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [x] reviewed tests and test coverage - [ ] manually tested (if applicable)
- Loading branch information
Showing
50 changed files
with
3,339 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
.changeset/entries/e0e50784a9447e03a4cab7f42c4020754fdb7fc2fabae2a8ce80f15be54561e2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
type: feat | ||
module: x/fees | ||
pull_request: 796 | ||
description: Added the new `x/fees` module | ||
backward_compatible: true | ||
date: 2022-04-08T10:16:28.516096837Z |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
syntax = "proto3"; | ||
package desmos.fees.v1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "desmos/fees/v1/params.proto"; | ||
|
||
option go_package = "github.com/desmos-labs/desmos/v3/x/fees/types"; | ||
|
||
// GenesisState contains the data of the genesis state for the fees module | ||
message GenesisState { | ||
option (gogoproto.goproto_getters) = false; | ||
|
||
desmos.fees.v1.Params params = 1 [ (gogoproto.nullable) = false ]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
syntax = "proto3"; | ||
package desmos.fees.v1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "cosmos/base/v1beta1/coin.proto"; | ||
|
||
option go_package = "github.com/desmos-labs/desmos/v3/x/fees/types"; | ||
|
||
// MinFee contains the minimum amount of coins that should be paid as a fee for | ||
// each message of the specific type sent | ||
message MinFee { | ||
string message_type = 1 [ (gogoproto.moretags) = "yaml:\"message_type\"" ]; | ||
|
||
repeated cosmos.base.v1beta1.Coin amount = 2 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", | ||
(gogoproto.moretags) = "yaml:\"amount\"" | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
syntax = "proto3"; | ||
package desmos.fees.v1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "desmos/fees/v1/min_fee.proto"; | ||
|
||
option go_package = "github.com/desmos-labs/desmos/v3/x/fees/types"; | ||
|
||
// Params contains the parameters for the fees module | ||
message Params { | ||
repeated desmos.fees.v1.MinFee min_fees = 1 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.moretags) = "yaml:\"min_fees\"" | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
syntax = "proto3"; | ||
package desmos.fees.v1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "google/api/annotations.proto"; | ||
import "desmos/fees/v1/params.proto"; | ||
|
||
option go_package = "github.com/desmos-labs/desmos/v3/x/fees/types"; | ||
|
||
// Query defines the gRPC querier service. | ||
service Query { | ||
// Params queries the fees module params | ||
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { | ||
option (google.api.http).get = "/desmos/fees/v1/fees/params"; | ||
} | ||
} | ||
|
||
// ___________________________________________________________________________________________________________________ | ||
|
||
// QueryParamsRequest is the request type for the Query/Params RPC method. | ||
message QueryParamsRequest {} | ||
|
||
// QueryParamsResponse is the response type for the Query/Params RPC | ||
message QueryParamsResponse { | ||
desmos.fees.v1.Params params = 1 [ (gogoproto.nullable) = false ]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.