-
Notifications
You must be signed in to change notification settings - Fork 81
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
Quitting the DAO #67
base: main
Are you sure you want to change the base?
Quitting the DAO #67
Conversation
There are open questions, such was: - should quitting be still classified as a proposal? - should it execute immediately? - how should it behave for non-existing users? - is being tagged for the next cleanup a better approach?
Hotfix/remove sim test code
/// https://github.com/near-daos/sputnik-dao-contract/issues/41#issuecomment-971474598 | ||
#[test] | ||
#[ignore] | ||
fn test_quit_removes_votes2() { |
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.
This test requires the quitter's votes to be removed in order to pass, so it's currently ignored
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.
@swfsql Woah - its been a while on this one, but really like the feature here. Its def something thats come up as a need, and is a step in the right direction on governance upgrades. Thank you for starting this!
} | ||
|
||
let mut new_policy = self.policy.get().unwrap().to_policy(); | ||
let removed = new_policy.remove_member_from_all_roles(&quitting_member); |
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.
@swfsql I think it should check that this DAO wouldn't lock, like if this was the last council / etc. Would be sad to have a user quit and lock the DAO for scenarios with diff groups or token weights that leave a community hanging.
use crate::proposals::VersionedProposal; | ||
pub use crate::proposals::{Proposal, ProposalInput, ProposalKind, ProposalStatus}; | ||
pub use crate::types::{Action, Config}; | ||
|
||
mod basic_action; |
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.
Nit pick here - but can this file be called "council" or something, so its a file dedicated to council actions/abilities/controls?
); | ||
|
||
// ok: user2 quits again | ||
// (makes no change) |
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.
Shouldn't this error if user tries to quit that isnt council?
("has_23", vec![]), | ||
("has_234", vec![&user4.account_id]) | ||
] | ||
); |
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.
Add test for ensuring non-locking quit
Partial implementation of #41
Has updated binaries. For changes, please see previous commits where the new binaries would not have been committed yet.
quit_from_all_roles
that a user can call, alongsideadd_proposal
andact_proposal
.user: AccountId
anddao: String
, for checking against the user that called and also against the DAO name that the user is quitting from.