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
47
48
49
use frame_support::traits::{LockIdentifier, U128CurrencyToVote};
use pallet_elections_phragmen::Config;
use crate::{weights::pallet_elections_phragmen::WeightInfo, *};
#[cfg(feature = "runtime-benchmarks")]
frame_support::parameter_types! {
pub const CandidacyBond: Balance = 1;
pub const VotingBondBase: Balance = 1;
pub const VotingBondFactor: Balance = 1;
}
#[cfg(not(feature = "runtime-benchmarks"))]
frame_support::parameter_types! {
pub const CandidacyBond: Balance = COIN;
pub const VotingBondBase: Balance = pangolin_deposit(1, 64);
pub const VotingBondFactor: Balance = pangolin_deposit(0, 32);
}
frame_support::parameter_types! {
pub const PhragmenElectionPalletId: LockIdentifier = *b"phrelect";
pub const DesiredMembers: u32 = 7;
pub const DesiredRunnersUp: u32 = 7;
pub const TermDuration: BlockNumber = 24 * HOURS;
}
impl Config for Runtime {
type CandidacyBond = CandidacyBond;
type ChangeMembers = Council;
type Currency = Ring;
type CurrencyToVote = U128CurrencyToVote;
type DesiredMembers = DesiredMembers;
type DesiredRunnersUp = DesiredRunnersUp;
type Event = Event;
type InitializeMembers = Council;
type KickedMember = Treasury;
type LoserCandidate = Treasury;
type PalletId = PhragmenElectionPalletId;
type TermDuration = TermDuration;
type VotingBondBase = VotingBondBase;
type VotingBondFactor = VotingBondFactor;
type WeightInfo = WeightInfo<Self>;
}