Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 39 additions & 40 deletions runtime/bifrost/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ impl pallet_balances::Config for Runtime {
}

parameter_types! {
pub const CouncilMotionDuration: BlockNumber = 3 * DAYS;
pub const CouncilMotionDuration: BlockNumber = 2 * DAYS;
pub const CouncilMaxProposals: u32 = 100;
pub const CouncilMaxMembers: u32 = 100;
}
Expand All @@ -307,41 +307,7 @@ impl pallet_collective::Config<CouncilCollective> for Runtime {
}

parameter_types! {
pub const CandidacyBond: Balance = 100 * CENTS;
// 1 storage item created, key size is 32 bytes, value size is 16+16.
pub const VotingBondBase: Balance = deposit(1, 64);
// additional data per vote is 32 bytes (account id).
pub const VotingBondFactor: Balance = deposit(0, 32);
/// Daily council elections
pub const TermDuration: BlockNumber = 24 * HOURS;
pub const DesiredMembers: u32 = 19;
pub const DesiredRunnersUp: u32 = 19;
pub const PhragmenElectionPalletId: LockIdentifier = *b"phrelect";
}

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

impl pallet_elections_phragmen::Config for Runtime {
type CandidacyBond = CandidacyBond;
type ChangeMembers = Council;
type Currency = Balances;
type CurrencyToVote = frame_support::traits::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 = pallet_elections_phragmen::weights::SubstrateWeight<Runtime>;
}

parameter_types! {
pub const TechnicalMotionDuration: BlockNumber = 3 * DAYS;
pub const TechnicalMotionDuration: BlockNumber = 2 * DAYS;
pub const TechnicalMaxProposals: u32 = 100;
pub const TechnicalMaxMembers: u32 = 100;
}
Expand Down Expand Up @@ -390,15 +356,48 @@ impl pallet_membership::Config<pallet_membership::Instance2> for Runtime {
type WeightInfo = pallet_membership::weights::SubstrateWeight<Runtime>;
}

parameter_types! {
pub const CandidacyBond: Balance = 100 * CENTS;
// 1 storage item created, key size is 32 bytes, value size is 16+16.
pub const VotingBondBase: Balance = deposit(1, 64);
// additional data per vote is 32 bytes (account id).
pub const VotingBondFactor: Balance = deposit(0, 32);
/// Daily council elections
pub const TermDuration: BlockNumber = 24 * HOURS;
pub const DesiredMembers: u32 = 7;
pub const DesiredRunnersUp: u32 = 7;
pub const PhragmenElectionPalletId: LockIdentifier = *b"phrelect";
}

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

impl pallet_elections_phragmen::Config for Runtime {
type CandidacyBond = CandidacyBond;
type ChangeMembers = Council;
type Currency = Balances;
type CurrencyToVote = frame_support::traits::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 = pallet_elections_phragmen::weights::SubstrateWeight<Runtime>;
}

parameter_types! {
pub const LaunchPeriod: BlockNumber = 7 * DAYS;
pub const VotingPeriod: BlockNumber = 7 * DAYS;
pub const FastTrackVotingPeriod: BlockNumber = 3 * HOURS;
pub const MinimumDeposit: Balance = 50 * DOLLARS;
pub const EnactmentPeriod: BlockNumber = 8 * DAYS;
pub const MinimumDeposit: Balance = 100 * DOLLARS;
pub const EnactmentPeriod: BlockNumber = 2 * DAYS;
pub const CooloffPeriod: BlockNumber = 7 * DAYS;
// One cent: $10,000 / MB
pub const PreimageByteDeposit: Balance = 100 * MILLICENTS;
pub const PreimageByteDeposit: Balance = 10 * MILLICENTS;
pub const InstantAllowed: bool = true;
pub const MaxVotes: u32 = 100;
pub const MaxProposals: u32 = 100;
Expand Down