-
Notifications
You must be signed in to change notification settings - Fork 32
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
DAO refactoring: bring submit proposal to neutron msg #69
Merged
Merged
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
426adac
bring submit proposal to neutron msg
quasisamurai d122323
fmt
quasisamurai c7744a5
return randomly delete derives
quasisamurai 9f08f89
regenerate
quasisamurai d0b677e
refactor name and comments
quasisamurai fe75ec0
re-generate
quasisamurai d0a3de1
re-generate
quasisamurai eaeb1be
extend comment
quasisamurai 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
4d2a9f1b9d6e8181c3ecca744ae5e42667cfe9e4c2dccca1ae08a14235e18508 ibc_transfer.wasm | ||
cbf63b17bd81dcce44a3ba3d5b4e61ec6f1da8e3a1f90041d518ac4397b326bd neutron_interchain_queries.wasm | ||
a34dcff26a3709f5382d526ade65d41384e376eda7a28c07c588f4301554debe neutron_interchain_txs.wasm | ||
8d13b8165b699d9709414c20e41a2adedb0591a00f9be633fb4684b31a016fda neutron_validators_test.wasm | ||
adca79965655a68948496a29f6a83631a722a9605215bcce3a4fa7df6500d10e ibc_transfer.wasm | ||
df49934ef96ebd0e14c0a124dae19c3fdb5b009de25c928d27af139948a59330 neutron_interchain_queries.wasm | ||
6994f64f65b0bd639e6621dcb5c02eb79741cfb0ea18d6a25e83b16b7c9b9785 neutron_interchain_txs.wasm | ||
684c447068313f47d3754625ba73134bc16f83939633f309c6891dc3d41c73c7 neutron_validators_test.wasm | ||
2e7a0f168de97eebf4080df6f9fe23987fc96ac5852f29ca6c489dee7b10e6dd reflect.wasm |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
|
@@ -110,6 +110,8 @@ pub enum NeutronMsg { | |
timeout_timestamp: u64, | ||
fee: IbcFee, | ||
}, | ||
/// SubmitProposal sends a proposal to neutron's Admin module | ||
SubmitProposal { proposals: Proposals }, | ||
} | ||
|
||
impl NeutronMsg { | ||
|
@@ -227,6 +229,16 @@ impl NeutronMsg { | |
pub fn remove_interchain_query(query_id: u64) -> Self { | ||
NeutronMsg::RemoveInterchainQuery { query_id } | ||
} | ||
|
||
/// Basic helper to define a parameter change proposal passed to AdminModule: | ||
/// * **proposal** is struct which contains proposal that should change network parameter | ||
pub fn submit_param_change_proposal(proposal: ParamChangeProposal) -> Self { | ||
sotnikov-s marked this conversation as resolved.
Show resolved
Hide resolved
|
||
NeutronMsg::SubmitProposal { | ||
proposals: Proposals { | ||
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. mb it's |
||
param_change_proposal: Option::from(proposal), | ||
}, | ||
} | ||
} | ||
} | ||
|
||
impl From<NeutronMsg> for CosmosMsg<NeutronMsg> { | ||
|
@@ -264,3 +276,35 @@ pub struct MsgIbcTransferResponse { | |
/// **channel** is a src channel on neutron side trasaction was submitted from | ||
pub channel: String, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] | ||
#[serde(rename_all = "snake_case")] | ||
/// Proposals defines the struct for various proposals which neutron may accept (currently only parameter change) | ||
pub struct Proposals { | ||
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.
|
||
/// **param_change_proposal** is a parameter change proposal field | ||
pub param_change_proposal: Option<ParamChangeProposal>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] | ||
#[serde(rename_all = "snake_case")] | ||
/// ParamChangeProposal defines the struct for single parameter change proposal | ||
pub struct ParamChangeProposal { | ||
/// **title** is a text title of proposal. Non unique | ||
pub title: String, | ||
/// **descriptionr** is a text description of proposal. Non unique | ||
pub description: String, | ||
/// **param_changes** is a vector of params to be changed. Non unique | ||
pub param_changes: Vec<ParamChange>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)] | ||
#[serde(rename_all = "snake_case")] | ||
/// ParamChange defines the struct for parameter change request | ||
pub struct ParamChange { | ||
/// **subspace** is a key of module to which the parameter to change belongs. Unique for each module | ||
pub subspace: String, | ||
/// **key** is a name of parameter. Unique for subspace | ||
pub key: String, | ||
/// **value** is a new value for given parameter. Non unique | ||
pub value: String, | ||
} |
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.