Skip to content
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 8 commits into from
Dec 10, 2022

Conversation

quasisamurai
Copy link
Contributor

@quasisamurai quasisamurai commented Dec 8, 2022

Required by this PR

/// * **proposal** is struct which contains proposal that should change network parameter
pub fn submit_param_change_proposal(proposal: ParamChangeProposal) -> Self {
NeutronMsg::SubmitProposal {
proposals: Proposals {
Copy link
Contributor

@ratik ratik Dec 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mb it's Proposal and not Proposals?

@@ -110,6 +110,8 @@ pub enum NeutronMsg {
timeout_timestamp: u64,
fee: IbcFee,
},
/// SubmitProposal sends a proposal to neutron's Admin module
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Rename to SubmitAdminProposal
  2. Write a comment that explicitly states that this type of messages can only be executed by the Neutron DAO

#[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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Rename to AdminProposal
  2. Add a comment that currently only param change proposals are implemented, but new types of admin proposals might be implemented in the future

@@ -110,6 +110,9 @@ pub enum NeutronMsg {
timeout_timestamp: u64,
fee: IbcFee,
},
/// SubmitAdminProposal sends a proposal to neutron's Admin module.
/// This type of messages can be only executed by Neutron DAO.
SubmitProposal { admin_proposal: AdminProposal },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename to SubmitAdminProposal.

zavgorodnii
zavgorodnii previously approved these changes Dec 9, 2022
ratik
ratik previously approved these changes Dec 9, 2022
packages/neutron-sdk/src/bindings/msg.rs Show resolved Hide resolved
packages/neutron-sdk/src/bindings/msg.rs Outdated Show resolved Hide resolved
@@ -110,6 +110,9 @@ pub enum NeutronMsg {
timeout_timestamp: u64,
fee: IbcFee,
},
/// SubmitAdminProposal sends a proposal to neutron's Admin module.
/// This type of messages can be only executed by Neutron DAO.
SubmitAdminProposal { admin_proposal: AdminProposal },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it could be a good idea to hide the variant by some feature flag, lets say "dao", and hide other admin/dao specific types and functions as well

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's an interesting but not really useful idea. I'd discuss whether we really need it and, if yes, made it as a separate task

@quasisamurai quasisamurai dismissed stale reviews from ratik and zavgorodnii via eaeb1be December 9, 2022 13:41
@zavgorodnii zavgorodnii merged commit 3ad8193 into main Dec 10, 2022
@quasisamurai quasisamurai deleted the feat/neutron-msg-update branch December 12, 2022 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants