mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 21:11:07 +00:00
Collective weights (#5802)
This commit is contained in:
@@ -58,6 +58,8 @@ use pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo;
|
||||
use pallet_contracts_rpc_runtime_api::ContractExecResult;
|
||||
use pallet_session::{historical as pallet_session_historical};
|
||||
use sp_inherents::{InherentData, CheckInherentsResult};
|
||||
use codec::Encode;
|
||||
use static_assertions::const_assert;
|
||||
|
||||
#[cfg(any(feature = "std", test))]
|
||||
pub use sp_runtime::BuildStorage;
|
||||
@@ -67,7 +69,6 @@ pub use frame_system::Call as SystemCall;
|
||||
pub use pallet_contracts::Gas;
|
||||
pub use frame_support::StorageValue;
|
||||
pub use pallet_staking::StakerStatus;
|
||||
use codec::Encode;
|
||||
|
||||
/// Implementations of some helper traits passed into runtime modules as associated types.
|
||||
pub mod impls;
|
||||
@@ -90,7 +91,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
// and set impl_version to 0. If only runtime
|
||||
// implementation changes and behavior does not, then leave spec_version as
|
||||
// is and increment impl_version.
|
||||
spec_version: 247,
|
||||
spec_version: 248,
|
||||
impl_version: 0,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
transaction_version: 1,
|
||||
@@ -377,6 +378,7 @@ impl pallet_democracy::Trait for Runtime {
|
||||
|
||||
parameter_types! {
|
||||
pub const CouncilMotionDuration: BlockNumber = 5 * DAYS;
|
||||
pub const CouncilMaxProposals: u32 = 100;
|
||||
}
|
||||
|
||||
type CouncilCollective = pallet_collective::Instance1;
|
||||
@@ -385,16 +387,20 @@ impl pallet_collective::Trait<CouncilCollective> for Runtime {
|
||||
type Proposal = Call;
|
||||
type Event = Event;
|
||||
type MotionDuration = CouncilMotionDuration;
|
||||
type MaxProposals = CouncilMaxProposals;
|
||||
}
|
||||
|
||||
const DESIRED_MEMBERS: u32 = 13;
|
||||
parameter_types! {
|
||||
pub const CandidacyBond: Balance = 10 * DOLLARS;
|
||||
pub const VotingBond: Balance = 1 * DOLLARS;
|
||||
pub const TermDuration: BlockNumber = 7 * DAYS;
|
||||
pub const DesiredMembers: u32 = 13;
|
||||
pub const DesiredMembers: u32 = DESIRED_MEMBERS;
|
||||
pub const DesiredRunnersUp: u32 = 7;
|
||||
pub const ElectionsPhragmenModuleId: LockIdentifier = *b"phrelect";
|
||||
}
|
||||
// Make sure that there are no more than `MAX_MEMBERS` members elected via phragmen.
|
||||
const_assert!(DESIRED_MEMBERS <= pallet_collective::MAX_MEMBERS);
|
||||
|
||||
impl pallet_elections_phragmen::Trait for Runtime {
|
||||
type ModuleId = ElectionsPhragmenModuleId;
|
||||
@@ -417,6 +423,7 @@ impl pallet_elections_phragmen::Trait for Runtime {
|
||||
|
||||
parameter_types! {
|
||||
pub const TechnicalMotionDuration: BlockNumber = 5 * DAYS;
|
||||
pub const TechnicalMaxProposals: u32 = 100;
|
||||
}
|
||||
|
||||
type TechnicalCollective = pallet_collective::Instance2;
|
||||
@@ -425,6 +432,7 @@ impl pallet_collective::Trait<TechnicalCollective> for Runtime {
|
||||
type Proposal = Call;
|
||||
type Event = Event;
|
||||
type MotionDuration = TechnicalMotionDuration;
|
||||
type MaxProposals = TechnicalMaxProposals;
|
||||
}
|
||||
|
||||
impl pallet_membership::Trait<pallet_membership::Instance1> for Runtime {
|
||||
|
||||
Reference in New Issue
Block a user