-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support msg update params gov proposal #1247
Merged
alpe
merged 14 commits into
develop_sdk47
from
1243-support_msg_update_params_gov_proposal
Mar 15, 2023
Merged
Changes from 11 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
45f9350
Add MsgUpdateParams support
pinosu 0120ec2
Implement UpdateParams msg
pinosu b48c263
Fix test UpdateParams
pinosu d7f9a26
Add migration test
pinosu 4bb81db
Fix
pinosu 8365c2c
Fix lint issues
pinosu e409827
Revert changes according to review feedback
pinosu 6fc9ef5
Remove more x/params dependencies
pinosu 455e230
Remove x/params from genesis test
pinosu 9592980
Formatting
alpe f6260c9
Restore old changes
pinosu f58e01b
fix lint
pinosu 08d9d5d
Fix tests and restructure migrations
alpe 5e3bb17
Rename alias for convention
alpe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ import "cosmos/base/v1beta1/coin.proto"; | |
import "cosmos/msg/v1/msg.proto"; | ||
import "gogoproto/gogo.proto"; | ||
import "cosmwasm/wasm/v1/types.proto"; | ||
import "cosmos_proto/cosmos.proto"; | ||
|
||
option go_package = "github.com/CosmWasm/wasmd/x/wasm/types"; | ||
option (gogoproto.goproto_getters_all) = false; | ||
|
@@ -32,6 +33,11 @@ service Msg { | |
// UpdateInstantiateConfig updates instantiate config for a smart contract | ||
rpc UpdateInstantiateConfig(MsgUpdateInstantiateConfig) | ||
returns (MsgUpdateInstantiateConfigResponse); | ||
// UpdateParams defines a governance operation for updating the x/wasm | ||
// module parameters. The authority is defined in the keeper. | ||
// | ||
// Since: 0.40 | ||
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); | ||
} | ||
|
||
// MsgStoreCode submit Wasm code to the system | ||
|
@@ -206,4 +212,25 @@ message MsgUpdateInstantiateConfig { | |
} | ||
|
||
// MsgUpdateInstantiateConfigResponse returns empty data | ||
message MsgUpdateInstantiateConfigResponse {} | ||
message MsgUpdateInstantiateConfigResponse {} | ||
|
||
// MsgUpdateParams is the Msg/UpdateParams request type. | ||
// | ||
// Since: 0.40 | ||
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/wasm parameters to update. | ||
// | ||
// NOTE: All parameters must be supplied. | ||
Params params = 2 [ (gogoproto.nullable) = false ]; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 nice |
||
|
||
// MsgUpdateParamsResponse defines the response structure for executing a | ||
// MsgUpdateParams message. | ||
// | ||
// Since: 0.40 | ||
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,18 @@ | ||
package exported | ||
|
||
import ( | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" | ||
) | ||
|
||
type ( | ||
ParamSet = paramtypes.ParamSet | ||
|
||
// Subspace defines an interface that implements the legacy x/params Subspace | ||
// type. | ||
// | ||
// NOTE: This is used solely for migration of x/params managed parameters. | ||
Subspace interface { | ||
GetParamSet(ctx sdk.Context, ps ParamSet) | ||
} | ||
) |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thanks for adding this