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

Split StakingMsg::Withdraw #876

Merged
merged 2 commits into from
Apr 14, 2021
Merged

Split StakingMsg::Withdraw #876

merged 2 commits into from
Apr 14, 2021

Conversation

webmaster128
Copy link
Member

Closes #848

Copy link
Member

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

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

Looks good, nice comments.
I would just like to ensure these hide behind the staking feature flag

@@ -88,6 +80,27 @@ pub enum StakingMsg {
},
}

/// The message types of the distribution module.
Copy link
Member

Choose a reason for hiding this comment

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

It looks good.

@@ -24,6 +24,7 @@ where
// to call into more app-specific code (whatever they define)
Custom(T),
Staking(StakingMsg),
Distribution(DistributionMsg),
Copy link
Member

Choose a reason for hiding this comment

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

Once upon a time, StakingMsg was feature gated under #[cfg(feature = "staking")]. I think it should be again, and same with DistributionMsg. This means that every contract that uses them is forced to expose the requires_staking export flag and then can fail on upload to chains without PoS (I expect some PoA chains and PoE chains to use CosmWasm without staking and delegation).

Copy link
Member Author

@webmaster128 webmaster128 Apr 14, 2021

Choose a reason for hiding this comment

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

It was introduced in #300 and at some point along the way we decided to remove it at least for messages. I don't member why. Maybe it was related to the exhaustive/non-exhaustive and related trouble on the enum. But since it works well for the stargate flag now, I'll just try to add it again.

packages/std/src/results/cosmos_msg.rs Show resolved Hide resolved
@webmaster128
Copy link
Member Author

Yeah, makes sense, will update

Copy link
Member

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

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

Okay, #878 makes sense

If you rebase on that and do the same for DistributionMsg, then this is good to merge.

@webmaster128 webmaster128 added the automerge See mergify.io label Apr 14, 2021
@mergify mergify bot merged commit afbd217 into main Apr 14, 2021
@mergify mergify bot deleted the split-withdraw branch April 14, 2021 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge See mergify.io
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StakingMsg::Withdraw has unintended side-effect
2 participants