1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// --- paritytech ---
pub use pallet_collective::{Instance1 as CouncilCollective, Instance2 as TechnicalCollective};

// --- paritytech ---
use pallet_collective::{Config, PrimeDefaultVote};
// --- darwinia-network ---
use crate::{
	weights::{
		pallet_collective_council::WeightInfo as CouncilWeightInfo,
		pallet_collective_technical_committee::WeightInfo as TechnicalWeightInfo,
	},
	*,
};

frame_support::parameter_types! {
	pub const CouncilMotionDuration: BlockNumber = 3 * DAYS;
	pub const CouncilMaxProposals: u32 = 100;
	pub const CouncilMaxMembers: u32 = 100;
	pub const TechnicalMotionDuration: BlockNumber = 3 * DAYS;
	pub const TechnicalMaxProposals: u32 = 100;
	pub const TechnicalMaxMembers: u32 = 100;
}

// Make sure that there are no more than `MaxMembers` members elected via elections-phragmen.
static_assertions::const_assert!(DesiredMembers::get() <= CouncilMaxMembers::get());

impl Config<CouncilCollective> for Runtime {
	type DefaultVote = PrimeDefaultVote;
	type Event = Event;
	type MaxMembers = CouncilMaxMembers;
	type MaxProposals = CouncilMaxProposals;
	type MotionDuration = CouncilMotionDuration;
	type Origin = Origin;
	type Proposal = Call;
	type WeightInfo = CouncilWeightInfo<Self>;
}
impl Config<TechnicalCollective> for Runtime {
	type DefaultVote = PrimeDefaultVote;
	type Event = Event;
	type MaxMembers = TechnicalMaxMembers;
	type MaxProposals = TechnicalMaxProposals;
	type MotionDuration = TechnicalMotionDuration;
	type Origin = Origin;
	type Proposal = Call;
	type WeightInfo = TechnicalWeightInfo<Self>;
}