-
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.
feat: updated mechanism for fees in custom denoms
- Loading branch information
Showing
67 changed files
with
3,129 additions
and
771 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
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,10 @@ | ||
syntax = "proto3"; | ||
package nolus.tax.v2; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "nolus/tax/v2/params.proto"; | ||
|
||
option go_package = "github.com/Nolus-Protocol/nolus-core/x/tax/typesv2"; | ||
|
||
// GenesisState defines the tax module's genesis state. | ||
message GenesisState { 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,29 @@ | ||
syntax = "proto3"; | ||
package nolus.tax.v2; | ||
|
||
import "gogoproto/gogo.proto"; | ||
|
||
option go_package = "github.com/Nolus-Protocol/nolus-core/x/tax/typesv2"; | ||
|
||
message Params { | ||
option (gogoproto.goproto_stringer) = false; | ||
|
||
int32 fee_rate = 1; | ||
string base_denom = 2; | ||
repeated DexFeeParams dex_fee_params = 3; | ||
string treasury_address = 4; | ||
} | ||
|
||
// Defines the accepted fees with corresponding min prices and profit addresses | ||
message DexFeeParams { | ||
string profit_address = 1; | ||
repeated DenomPrice accepted_denoms_min_prices = 2; | ||
} | ||
|
||
message DenomPrice { | ||
string denom = 1; | ||
// ticker will only be used for a more readable format for the users | ||
string ticker = 2; | ||
float min_price = 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,25 @@ | ||
syntax = "proto3"; | ||
package nolus.tax.v2; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "google/api/annotations.proto"; | ||
import "nolus/tax/v2/params.proto"; | ||
|
||
option go_package = "github.com/Nolus-Protocol/nolus-core/x/tax/typesv2"; | ||
|
||
// Query defines the gRPC querier service. | ||
service Query { | ||
// Parameters queries the parameters of the module. | ||
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { | ||
option (google.api.http).get = "/nolus/tax/v2/params"; | ||
} | ||
} | ||
|
||
// QueryParamsRequest is request type for the Query/Params RPC method. | ||
message QueryParamsRequest {} | ||
|
||
// QueryParamsResponse is response type for the Query/Params RPC method. | ||
message QueryParamsResponse { | ||
// params holds all the parameters of this module. | ||
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,41 @@ | ||
syntax = "proto3"; | ||
package nolus.tax.v2; | ||
|
||
option go_package = "github.com/Nolus-Protocol/nolus-core/x/tax/typesv2"; | ||
|
||
import "cosmos/msg/v1/msg.proto"; | ||
import "nolus/tax/v2/params.proto"; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "cosmos_proto/cosmos.proto"; | ||
|
||
// Msg defines the x/tax Msg service. | ||
service Msg { | ||
option (cosmos.msg.v1.service) = true; | ||
// UpdateParams defines a governance operation for updating the x/tax 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/tax 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 {} |
Oops, something went wrong.