From 37f9e0bebfe3459ab65ca72998426176d0063a63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dino=20Pa=C4=8Dandi?= <3002868+Dinonard@users.noreply.github.com> Date: Tue, 8 Oct 2024 14:42:40 +0200 Subject: [PATCH] Community council dApp unregister (#1371) --- primitives/src/governance.rs | 5 +++++ runtime/shibuya/src/lib.rs | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/primitives/src/governance.rs b/primitives/src/governance.rs index da3acf4891..a7a1b9094a 100644 --- a/primitives/src/governance.rs +++ b/primitives/src/governance.rs @@ -80,3 +80,8 @@ pub type EnsureRootOrHalfCommunityCouncil = EitherOfDiverse< EnsureRoot, pallet_collective::EnsureProportionAtLeast, >; + +pub type EnsureRootOrFourFifthsCommunityCouncil = EitherOfDiverse< + EnsureRoot, + pallet_collective::EnsureProportionAtLeast, +>; diff --git a/runtime/shibuya/src/lib.rs b/runtime/shibuya/src/lib.rs index eb078daeb8..d80f483978 100644 --- a/runtime/shibuya/src/lib.rs +++ b/runtime/shibuya/src/lib.rs @@ -87,10 +87,10 @@ use astar_primitives::{ governance::{ CommunityCouncilCollectiveInst, CommunityCouncilMembershipInst, CommunityTreasuryInst, EnsureRootOrAllMainCouncil, EnsureRootOrAllTechnicalCommittee, - EnsureRootOrHalfCommunityCouncil, EnsureRootOrHalfMainCouncil, - EnsureRootOrHalfTechnicalCommittee, MainCouncilCollectiveInst, MainCouncilMembershipInst, - MainTreasuryInst, OracleMembershipInst, TechnicalCommitteeCollectiveInst, - TechnicalCommitteeMembershipInst, + EnsureRootOrFourFifthsCommunityCouncil, EnsureRootOrHalfCommunityCouncil, + EnsureRootOrHalfMainCouncil, EnsureRootOrHalfTechnicalCommittee, MainCouncilCollectiveInst, + MainCouncilMembershipInst, MainTreasuryInst, OracleMembershipInst, + TechnicalCommitteeCollectiveInst, TechnicalCommitteeMembershipInst, }, oracle::{CurrencyAmount, CurrencyId, DummyCombineData, Price}, xcm::AssetLocationIdConverter, @@ -466,7 +466,7 @@ impl pallet_dapp_staking::Config for Runtime { type Currency = Balances; type SmartContract = SmartContract; type ContractRegisterOrigin = EnsureRootOrHalfCommunityCouncil; - type ContractUnregisterOrigin = frame_system::EnsureRoot; + type ContractUnregisterOrigin = EnsureRootOrFourFifthsCommunityCouncil; type ManagerOrigin = EnsureRootOrHalfTechnicalCommittee; type NativePriceProvider = PriceAggregator; type StakingRewardHandler = Inflation;