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

Reject proposals when they cannot pass #181

Merged
merged 4 commits into from
Feb 25, 2022
Merged

Conversation

Callum-A
Copy link
Collaborator

Addresses Issue #169

Adds an is_rejected method to both Proposal types which does the same as is_passed however checks no votes for a majority.
Added unit tests for the logic on the Proposal side.
Added integration tests for both a DAO and Multisig.

Feedback appreciated.

Copy link
Contributor

@maurolacy maurolacy 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. It would be good to have unit tests for checking and documenting the "reject early" case. (already done)

Will backport this to cw-plus at some point.

contracts/cw3-multisig/src/state.rs Show resolved Hide resolved
Copy link
Contributor

@maurolacy maurolacy left a comment

Choose a reason for hiding this comment

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

Here are the unit tests. It seems I was reviewing an outdated version before.

@maurolacy
Copy link
Contributor

maurolacy commented Feb 21, 2022

Returning to the upstream version of cw3-flex-multisig could be a good idea at some point.

Need to confirm / check this, but at least in principle you could be contributing / adding these there directly there.

@Callum-A
Copy link
Collaborator Author

Returning to the upstream version of cw3-flex-multisig could be a good idea at some point.

Need to confirm / check this, but at least in principle you could be contributing / adding these there directly there.

I can definitely look into this upstream

Copy link
Contributor

@0xekez 0xekez left a comment

Choose a reason for hiding this comment

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

Looks great. Thanks for all the tests!

@JakeHartnell JakeHartnell merged commit baad618 into main Feb 25, 2022
@JakeHartnell JakeHartnell deleted the reject-when-not-pass branch February 25, 2022 05:03
@JakeHartnell
Copy link
Member

Awesome work!

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.

4 participants