git.delta.rocks / unique-network / refs/commits / 5ef1c1c9c81a

difftreelog

fix financial council membership

Daniel Shiposha2024-06-04parent: #d9af4ae.patch.diff
in: master

1 file changed

modifiedruntime/common/config/governance/financial_council.rsdiffbeforeafterboth
after · runtime/common/config/governance/financial_council.rs
1use super::*;23parameter_types! {4	pub FinancialCouncilMaxProposals: u32 = 100;5	pub FinancialCouncilMaxMembers: u32 = 100;6}78#[cfg(not(feature = "gov-test-timings"))]9use crate::governance_timings::financial_council as financial_council_timings;1011#[cfg(feature = "gov-test-timings")]12pub mod financial_council_timings {13	use super::*;1415	parameter_types! {16		pub FinancialCouncilMotionDuration: BlockNumber = 35;17	}18}1920pub type FinancialCollective = pallet_collective::Instance3;21impl pallet_collective::Config<FinancialCollective> for Runtime {22	type RuntimeOrigin = RuntimeOrigin;23	type Proposal = RuntimeCall;24	type RuntimeEvent = RuntimeEvent;25	type MotionDuration = financial_council_timings::FinancialCouncilMotionDuration;26	type MaxProposals = FinancialCouncilMaxProposals;27	type MaxMembers = FinancialCouncilMaxMembers;28	type DefaultVote = pallet_collective::PrimeDefaultVote;29	type WeightInfo = pallet_collective::weights::SubstrateWeight<Runtime>;30	type SetMembersOrigin = EnsureRoot<AccountId>;31	type MaxProposalWeight = MaxCollectivesProposalWeight;32}3334pub type FinancialCollectiveMembership = pallet_membership::Instance3;35impl pallet_membership::Config<FinancialCollectiveMembership> for Runtime {36	type RuntimeEvent = RuntimeEvent;37	type AddOrigin = RootOrMoreThanHalfCouncil;38	type RemoveOrigin = RootOrMoreThanHalfCouncil;39	type SwapOrigin = RootOrMoreThanHalfCouncil;40	type ResetOrigin = EnsureRoot<AccountId>;41	type PrimeOrigin = RootOrMoreThanHalfCouncil;42	type MembershipInitialized = FinancialCollective;43	type MembershipChanged = FinancialCollective;44	type MaxMembers = FinancialCouncilMaxMembers;45	type WeightInfo = pallet_membership::weights::SubstrateWeight<Runtime>;46}4748pub type FinancialCouncilMember = pallet_collective::EnsureMember<AccountId, FinancialCollective>;4950pub type RootOrFinancialCouncilMember =51	EitherOfDiverse<EnsureRoot<AccountId>, FinancialCouncilMember>;5253pub type AllFinancialCouncil =54	pallet_collective::EnsureProportionAtLeast<AccountId, FinancialCollective, 1, 1>;5556pub type RootOrAllFinancialCouncil = EitherOfDiverse<EnsureRoot<AccountId>, AllFinancialCouncil>;