-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add globalfee module protos and types * add globalfee module * fix storekey and keeper initialization issues
- Loading branch information
Showing
32 changed files
with
3,602 additions
and
5 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
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
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,43 @@ | ||
syntax = "proto3"; | ||
package OmniFlix.globalfee.v1beta1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "cosmos/base/v1beta1/coin.proto"; | ||
|
||
option go_package = "github.com/OmniFlix/omniflixhub/v2/x/globalfee/types"; | ||
|
||
// GenesisState - initial state of module | ||
message GenesisState { | ||
// Params of this module | ||
Params params = 1 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.jsontag) = "params,omitempty" | ||
]; | ||
} | ||
|
||
// Params defines the set of module parameters. | ||
message Params { | ||
// minimum_gas_prices stores the minimum gas price(s) for all TX on the chain. | ||
// When multiple coins are defined then they are accepted alternatively. | ||
// The list must be sorted by denoms asc. No duplicate denoms or zero amount | ||
// values allowed. For more information see | ||
// https://docs.cosmos.network/main/modules/auth#concepts | ||
repeated cosmos.base.v1beta1.DecCoin minimum_gas_prices = 1 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.jsontag) = "minimum_gas_prices,omitempty", | ||
(gogoproto.moretags) = "yaml:\"minimum_gas_prices\"", | ||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins" | ||
]; | ||
|
||
// bypass_min_fee_msg_types defines a list of message type urls | ||
// that are free of fee charge. | ||
repeated string bypass_min_fee_msg_types = 2 [ | ||
(gogoproto.jsontag) = "bypass_min_fee_msg_types,omitempty", | ||
(gogoproto.moretags) = "yaml:\"bypass_min_fee_msg_types\"" | ||
]; | ||
|
||
// max_total_bypass_min_fee_msg_gas_usage defines the total maximum gas usage | ||
// allowed for a transaction containing only messages of types in bypass_min_fee_msg_types | ||
// to bypass fee charge. | ||
uint64 max_total_bypass_min_fee_msg_gas_usage = 3; | ||
} |
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,27 @@ | ||
syntax = "proto3"; | ||
package OmniFlix.globalfee.v1beta1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "google/api/annotations.proto"; | ||
import "OmniFlix/globalfee/v1beta1/genesis.proto"; | ||
|
||
option go_package = "github.com/OmniFlix/omniflixhub/v2/x/globalfee/types"; | ||
|
||
// Query defines the gRPC querier service. | ||
service Query { | ||
rpc Params(QueryParamsRequest) | ||
returns (QueryParamsResponse) { | ||
option (google.api.http).get = | ||
"/omniflix/globalfee/v1beta1/params"; | ||
} | ||
} | ||
|
||
// QueryMinimumGasPricesRequest is the request type for the | ||
// Query/MinimumGasPrices RPC method. | ||
message QueryParamsRequest {} | ||
|
||
// QueryMinimumGasPricesResponse is the response type for the | ||
// Query/MinimumGasPrices RPC method. | ||
message QueryParamsResponse { | ||
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,40 @@ | ||
syntax = "proto3"; | ||
package OmniFlix.globalfee.v1beta1; | ||
|
||
|
||
import "cosmos/msg/v1/msg.proto"; | ||
import "OmniFlix/globalfee/v1beta1/genesis.proto"; | ||
import "gogoproto/gogo.proto"; | ||
import "cosmos_proto/cosmos.proto"; | ||
|
||
option go_package = "github.com/OmniFlix/omniflixhub/v2/x/globalfee/types"; | ||
|
||
// Msg defines the x/globalfee Msg service. | ||
service Msg { | ||
// UpdateParams defines a governance operation for updating the x/globalfee module | ||
// parameters. The authority is hard-coded to the x/gov module account. | ||
// | ||
// Since: cosmos-sdk 0.47 | ||
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); | ||
} | ||
|
||
// MsgUpdateParams is the Msg/UpdateParams request type. | ||
// | ||
// Since: cosmos-sdk 0.47 | ||
message MsgUpdateParams { | ||
option (cosmos.msg.v1.signer) = "authority"; | ||
|
||
// authority is the address of the governance account. | ||
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; | ||
|
||
// params defines the x/mint parameters to update. | ||
// | ||
// NOTE: All parameters must be supplied. | ||
Params params = 2 [(gogoproto.nullable) = false]; | ||
} | ||
|
||
// MsgUpdateParamsResponse defines the response structure for executing a | ||
// MsgUpdateParams message. | ||
// | ||
// Since: cosmos-sdk 0.47 | ||
message MsgUpdateParamsResponse {} |
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 @@ | ||
# Global fee module | ||
|
||
The Global fee module was supplied by the great folks at [TGrade](https://github.com/confio/tgrade) 👋, minor modifications done by [cosmoshub](https://github.com/cosmos/gaia/tree/main/x/globalfee) team. | ||
All credits and big thanks go to the original authors and cosmoshub team. | ||
|
||
More information about global fee system please check [here](../../docs/modules/globalfee.md). |
Oops, something went wrong.