astar_primitives/
governance.rs1use crate::AccountId;
20use frame_support::traits::EitherOfDiverse;
21use frame_system::EnsureRoot;
22
23pub type MainCouncilMembershipInst = pallet_membership::Instance2;
24pub type TechnicalCommitteeMembershipInst = pallet_membership::Instance3;
25pub type CommunityCouncilMembershipInst = pallet_membership::Instance4;
26
27pub type MainCouncilCollectiveInst = pallet_collective::Instance2;
29pub type TechnicalCommitteeCollectiveInst = pallet_collective::Instance3;
30pub type CommunityCouncilCollectiveInst = pallet_collective::Instance4;
31
32pub type MainTreasuryInst = pallet_treasury::Instance1;
33pub type CommunityTreasuryInst = pallet_treasury::Instance2;
34
35pub type EnsureRootOrAllMainCouncil = EitherOfDiverse<
37 EnsureRoot<AccountId>,
38 pallet_collective::EnsureProportionAtLeast<AccountId, MainCouncilCollectiveInst, 1, 1>,
39>;
40
41pub type EnsureRootOrTwoThirdsMainCouncil = EitherOfDiverse<
42 EnsureRoot<AccountId>,
43 pallet_collective::EnsureProportionAtLeast<AccountId, MainCouncilCollectiveInst, 2, 3>,
44>;
45
46pub type EnsureRootOrThreeFourthMainCouncil = EitherOfDiverse<
47 EnsureRoot<AccountId>,
48 pallet_collective::EnsureProportionAtLeast<AccountId, MainCouncilCollectiveInst, 3, 4>,
49>;
50
51pub type EnsureRootOrHalfMainCouncil = EitherOfDiverse<
52 EnsureRoot<AccountId>,
53 pallet_collective::EnsureProportionAtLeast<AccountId, MainCouncilCollectiveInst, 1, 2>,
54>;
55
56pub type EnsureRootOrAllTechnicalCommittee = EitherOfDiverse<
58 EnsureRoot<AccountId>,
59 pallet_collective::EnsureProportionAtLeast<AccountId, TechnicalCommitteeCollectiveInst, 1, 1>,
60>;
61
62pub type EnsureRootOrTwoThirdsTechnicalCommittee = EitherOfDiverse<
63 EnsureRoot<AccountId>,
64 pallet_collective::EnsureProportionAtLeast<AccountId, TechnicalCommitteeCollectiveInst, 2, 3>,
65>;
66
67pub type EnsureRootOrHalfTechnicalCommittee = EitherOfDiverse<
68 EnsureRoot<AccountId>,
69 pallet_collective::EnsureProportionAtLeast<AccountId, TechnicalCommitteeCollectiveInst, 1, 2>,
70>;
71
72pub type EnsureRootOrAllCommunityCouncil = EitherOfDiverse<
74 EnsureRoot<AccountId>,
75 pallet_collective::EnsureProportionAtLeast<AccountId, CommunityCouncilCollectiveInst, 1, 1>,
76>;
77
78pub type EnsureRootOrTwoThirdsCommunityCouncil = EitherOfDiverse<
79 EnsureRoot<AccountId>,
80 pallet_collective::EnsureProportionAtLeast<AccountId, CommunityCouncilCollectiveInst, 2, 3>,
81>;
82
83pub type EnsureRootOrHalfCommunityCouncil = EitherOfDiverse<
84 EnsureRoot<AccountId>,
85 pallet_collective::EnsureProportionAtLeast<AccountId, CommunityCouncilCollectiveInst, 1, 2>,
86>;
87
88pub type EnsureRootOrFourFifthsCommunityCouncil = EitherOfDiverse<
89 EnsureRoot<AccountId>,
90 pallet_collective::EnsureProportionAtLeast<AccountId, CommunityCouncilCollectiveInst, 4, 5>,
91>;
92
93pub type EnsureRootOrHalfTechCommitteeOrTwoThirdCouncil = EitherOfDiverse<
95 EnsureRootOrHalfTechnicalCommittee,
96 pallet_collective::EnsureProportionAtLeast<AccountId, MainCouncilCollectiveInst, 2, 3>,
97>;