@@ -32,6 +32,7 @@ use frame_support::{
3232 } ,
3333 traits:: { Currency , Imbalance , KeyOwnerProofSystem , OnUnbalanced , Randomness , LockIdentifier } ,
3434} ;
35+ use frame_system:: { EnsureRoot , EnsureOneOf } ;
3536use frame_support:: traits:: { Filter , InstanceFilter } ;
3637use codec:: { Encode , Decode } ;
3738use sp_core:: {
@@ -96,7 +97,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
9697 // implementation changes and behavior does not, then leave spec_version as
9798 // is and increment impl_version.
9899 spec_version : 252 ,
99- impl_version : 0 ,
100+ impl_version : 1 ,
100101 apis : RUNTIME_API_VERSIONS ,
101102 transaction_version : 1 ,
102103} ;
@@ -410,7 +411,11 @@ impl pallet_staking::Trait for Runtime {
410411 type BondingDuration = BondingDuration ;
411412 type SlashDeferDuration = SlashDeferDuration ;
412413 /// A super-majority of the council can cancel the slash.
413- type SlashCancelOrigin = pallet_collective:: EnsureProportionAtLeast < _3 , _4 , AccountId , CouncilCollective > ;
414+ type SlashCancelOrigin = EnsureOneOf <
415+ AccountId ,
416+ EnsureRoot < AccountId > ,
417+ pallet_collective:: EnsureProportionAtLeast < _3 , _4 , AccountId , CouncilCollective >
418+ > ;
414419 type SessionInterface = Self ;
415420 type RewardCurve = RewardCurve ;
416421 type NextNewSession = Session ;
@@ -528,13 +533,18 @@ impl pallet_collective::Trait<TechnicalCollective> for Runtime {
528533 type MaxProposals = TechnicalMaxProposals ;
529534}
530535
536+ type EnsureRootOrHalfCouncil = EnsureOneOf <
537+ AccountId ,
538+ EnsureRoot < AccountId > ,
539+ pallet_collective:: EnsureProportionMoreThan < _1 , _2 , AccountId , CouncilCollective >
540+ > ;
531541impl pallet_membership:: Trait < pallet_membership:: Instance1 > for Runtime {
532542 type Event = Event ;
533- type AddOrigin = pallet_collective :: EnsureProportionMoreThan < _1 , _2 , AccountId , CouncilCollective > ;
534- type RemoveOrigin = pallet_collective :: EnsureProportionMoreThan < _1 , _2 , AccountId , CouncilCollective > ;
535- type SwapOrigin = pallet_collective :: EnsureProportionMoreThan < _1 , _2 , AccountId , CouncilCollective > ;
536- type ResetOrigin = pallet_collective :: EnsureProportionMoreThan < _1 , _2 , AccountId , CouncilCollective > ;
537- type PrimeOrigin = pallet_collective :: EnsureProportionMoreThan < _1 , _2 , AccountId , CouncilCollective > ;
543+ type AddOrigin = EnsureRootOrHalfCouncil ;
544+ type RemoveOrigin = EnsureRootOrHalfCouncil ;
545+ type SwapOrigin = EnsureRootOrHalfCouncil ;
546+ type ResetOrigin = EnsureRootOrHalfCouncil ;
547+ type PrimeOrigin = EnsureRootOrHalfCouncil ;
538548 type MembershipInitialized = TechnicalCommittee ;
539549 type MembershipChanged = TechnicalCommittee ;
540550}
@@ -554,8 +564,16 @@ parameter_types! {
554564impl pallet_treasury:: Trait for Runtime {
555565 type ModuleId = TreasuryModuleId ;
556566 type Currency = Balances ;
557- type ApproveOrigin = pallet_collective:: EnsureMembers < _4 , AccountId , CouncilCollective > ;
558- type RejectOrigin = pallet_collective:: EnsureMembers < _2 , AccountId , CouncilCollective > ;
567+ type ApproveOrigin = EnsureOneOf <
568+ AccountId ,
569+ EnsureRoot < AccountId > ,
570+ pallet_collective:: EnsureMembers < _4 , AccountId , CouncilCollective >
571+ > ;
572+ type RejectOrigin = EnsureOneOf <
573+ AccountId ,
574+ EnsureRoot < AccountId > ,
575+ pallet_collective:: EnsureMembers < _2 , AccountId , CouncilCollective >
576+ > ;
559577 type Tippers = Elections ;
560578 type TipCountdown = TipCountdown ;
561579 type TipFindersFee = TipFindersFee ;
@@ -734,8 +752,8 @@ impl pallet_identity::Trait for Runtime {
734752 type MaxAdditionalFields = MaxAdditionalFields ;
735753 type MaxRegistrars = MaxRegistrars ;
736754 type Slashed = Treasury ;
737- type ForceOrigin = pallet_collective :: EnsureProportionMoreThan < _1 , _2 , AccountId , CouncilCollective > ;
738- type RegistrarOrigin = pallet_collective :: EnsureProportionMoreThan < _1 , _2 , AccountId , CouncilCollective > ;
755+ type ForceOrigin = EnsureRootOrHalfCouncil ;
756+ type RegistrarOrigin = EnsureRootOrHalfCouncil ;
739757}
740758
741759parameter_types ! {
0 commit comments