sputnik-dao-contract
sputnik-dao-contract copied to clipboard
sputnikdao2: RoleKind::Everyone, can't set ProposalStatus::Approved
Imagine that scenario:
- We have a policy like that:
roles: [
{
name: "all",
kind: "Everyone",
permissions: ["*:AddProposal",
"*:VoteApprove"],
vote_policy: {}
}
];
...
default_vote_policy:
{
weight_kind: "TokenWeight",
....
So all that matters is delegaions 2. Delegaions on 'alice' >= threshold 3. Some proposal 4. And 'alice' tries to VoteApprove via act_proposal(). The issue is that this part is unreachable for RoleKind::Everyone(alice) https://github.com/near-daos/sputnik-dao-contract/blob/372df7d715c4c7c06ba14a3ba5b4db65f50b81f9/sputnikdao2/src/policy.rs#L383 Because of continue here. https://github.com/near-daos/sputnik-dao-contract/blob/372df7d715c4c7c06ba14a3ba5b4db65f50b81f9/sputnikdao2/src/policy.rs#L366
So RoleKind::Everyone can't execute proposal it seems