diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 668379c1a0ed..674aab6f9bd1 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -198,13 +198,19 @@ parameter_types! { pub const MaxScheduledPerBlock: u32 = 50; } +type ScheduleOrigin = EnsureOneOf< + AccountId, + EnsureRoot, + pallet_collective::EnsureProportionAtLeast<_1, _2, AccountId, CouncilCollective> +>; + impl pallet_scheduler::Config for Runtime { type Event = Event; type Origin = Origin; type PalletsOrigin = OriginCaller; type Call = Call; type MaximumWeight = MaximumSchedulerWeight; - type ScheduleOrigin = EnsureRoot; + type ScheduleOrigin = ScheduleOrigin; type MaxScheduledPerBlock = MaxScheduledPerBlock; type WeightInfo = weights::pallet_scheduler::WeightInfo; } diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index e99491783f6d..1db00d9fe8e8 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -183,13 +183,19 @@ parameter_types! { pub const MaxScheduledPerBlock: u32 = 50; } +type ScheduleOrigin = EnsureOneOf< + AccountId, + EnsureRoot, + pallet_collective::EnsureProportionAtLeast<_1, _2, AccountId, CouncilCollective> +>; + impl pallet_scheduler::Config for Runtime { type Event = Event; type Origin = Origin; type PalletsOrigin = OriginCaller; type Call = Call; type MaximumWeight = MaximumSchedulerWeight; - type ScheduleOrigin = EnsureRoot; + type ScheduleOrigin = ScheduleOrigin; type MaxScheduledPerBlock = MaxScheduledPerBlock; type WeightInfo = weights::pallet_scheduler::WeightInfo; }