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

Add proposer field to Proposal #140

Merged
merged 2 commits into from
Jan 21, 2022
Merged

Add proposer field to Proposal #140

merged 2 commits into from
Jan 21, 2022

Conversation

Callum-A
Copy link
Collaborator

Addresses #136

Adds proposer field to the Proposal which is populated by the sender of the propose message. Noticed the CW3 ProposalResponse struct does not have a proposer field. Does this need to be addressed separately?

@0xekez
Copy link
Contributor

0xekez commented Jan 19, 2022

Thanks for the contribution! Would you mind adding a test for this creating a new proposal and verifying that the field is set?

@Callum-A
Copy link
Collaborator Author

Thanks for the contribution! Would you mind adding a test for this creating a new proposal and verifying that the field is set?

Will do, should I just add this under test_propose_works in tests.rs?

@0xekez
Copy link
Contributor

0xekez commented Jan 19, 2022

Wherever is you think makes the most sense. Feel free to add a new test as well. Can never have too many :)

@Callum-A
Copy link
Collaborator Author

Will do. Any guidance on how to achieve this? As the CW3 Proposal Response message does not feature a proposer field. And the execute response already has an attribute for sender which is effectively the same as the proposer.

@0xekez
Copy link
Contributor

0xekez commented Jan 19, 2022

I've got no problem with making our own proposal response type that's the same as the cw3 version modulo the proposer field. You probably want to add it in query.rs.

When parsing, JSON doesn't even care if you have extra fields most of the time so it shouldn't be an issue in most cases to have the extra field for folks who expect us to implement cw3. Others welcome to chime in and disagree.

@Callum-A
Copy link
Collaborator Author

I've got no problem with making our own proposal response type that's the same as the cw3 version modulo the proposer field. You probably want to add it in query.rs.

When parsing, JSON doesn't even care if you have extra fields most of the time so it shouldn't be an issue in most cases to have the extra field for folks who expect us to implement cw3. Others welcome to chime in and disagree.

Decided to go with this, implemented the same attrs as the base CW3 module + proposer. Open to any feedback / disagreements.

@0xekez
Copy link
Contributor

0xekez commented Jan 21, 2022

Screenshot of the UI showing the proposer on a multisig based on this PR.
image

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.

This is great. Thanks so much for pushing this through! Comments are lovely, test is lovely, and schema is regenerated.

@0xekez
Copy link
Contributor

0xekez commented Jan 21, 2022

UI update for this: DA0-DA0/dao-dao-ui#255

@JakeHartnell JakeHartnell merged commit ec862c4 into main Jan 21, 2022
@JakeHartnell JakeHartnell deleted the multisig-proposer branch January 21, 2022 00:19
@JakeHartnell
Copy link
Member

🎉

Congrats @Callum-A on your first DAO DAO contribution!

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.

3 participants