sunshine-protocol / sunshine

Governance + Bounty Platform
Other
43 stars 16 forks source link

extend vote-petition to support any flat Vec<AccountId> structure #78

Closed 4meta5 closed 4 years ago

4meta5 commented 4 years ago

NOT a priority but it should be noted that vote-petition only inherits shares-membership (which inherts sunshine-org) and it only works when PetitionState.vote_id_reqs: (u32, u32) s.t. the first u32 is OrgId and the second is FlatShareId.

So to add support for org, we should basically add a path and change PetitionState.vote_id_reqs to an enum: { Org(u32), FlatSubOrg(u32, u32) }. We already have some variation of this and it is a common pattern. I think bank-offchain has a similar concept with SupportedOrganizationShape

NOT a priority, just wanted to write this down somewhere

4meta5 commented 4 years ago

done