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