From ff7448fd03fd3af2464d4d61ca333998b11ad3df Mon Sep 17 00:00:00 2001 From: NingBo Wang <2536935847@qq.com> Date: Fri, 31 Mar 2023 19:38:12 +0800 Subject: [PATCH] Add crowdloan to SafeCallFilter (#6903) * Add crowdloan to SafeCallFilter * Add crowdloan to SafeCallFilter --- runtime/kusama/src/xcm_config.rs | 12 +++++++++++- runtime/polkadot/src/xcm_config.rs | 12 +++++++++++- runtime/rococo/src/xcm_config.rs | 12 +++++++++++- runtime/westend/src/xcm_config.rs | 12 +++++++++++- 4 files changed, 44 insertions(+), 4 deletions(-) diff --git a/runtime/kusama/src/xcm_config.rs b/runtime/kusama/src/xcm_config.rs index 5a8495ca7998..f08f736f07df 100644 --- a/runtime/kusama/src/xcm_config.rs +++ b/runtime/kusama/src/xcm_config.rs @@ -26,7 +26,7 @@ use frame_support::{ weights::Weight, }; use frame_system::EnsureRoot; -use runtime_common::{paras_registrar, xcm_sender, ToAuthor}; +use runtime_common::{crowdloan, paras_registrar, xcm_sender, ToAuthor}; use sp_core::ConstU32; use xcm::latest::prelude::*; use xcm_builder::{ @@ -172,6 +172,16 @@ impl Contains for SafeCallFilter { RuntimeCall::Timestamp(..) | RuntimeCall::Indices(..) | RuntimeCall::Balances(..) | + RuntimeCall::Crowdloan( + crowdloan::Call::create { .. } | + crowdloan::Call::contribute { .. } | + crowdloan::Call::withdraw { .. } | + crowdloan::Call::refund { .. } | + crowdloan::Call::dissolve { .. } | + crowdloan::Call::edit { .. } | + crowdloan::Call::poke { .. } | + crowdloan::Call::contribute_all { .. }, + ) | RuntimeCall::Staking( pallet_staking::Call::bond { .. } | pallet_staking::Call::bond_extra { .. } | diff --git a/runtime/polkadot/src/xcm_config.rs b/runtime/polkadot/src/xcm_config.rs index 585197a475fb..bd95a7586594 100644 --- a/runtime/polkadot/src/xcm_config.rs +++ b/runtime/polkadot/src/xcm_config.rs @@ -29,7 +29,7 @@ use frame_support::{ use frame_system::EnsureRoot; use pallet_xcm::XcmPassthrough; use polkadot_runtime_constants::{system_parachain::*, xcm::body::FELLOWSHIP_ADMIN_INDEX}; -use runtime_common::{paras_registrar, xcm_sender, ToAuthor}; +use runtime_common::{crowdloan, paras_registrar, xcm_sender, ToAuthor}; use sp_core::ConstU32; use xcm::latest::prelude::*; use xcm_builder::{ @@ -182,6 +182,16 @@ impl Contains for SafeCallFilter { RuntimeCall::Timestamp(..) | RuntimeCall::Indices(..) | RuntimeCall::Balances(..) | + RuntimeCall::Crowdloan( + crowdloan::Call::create { .. } | + crowdloan::Call::contribute { .. } | + crowdloan::Call::withdraw { .. } | + crowdloan::Call::refund { .. } | + crowdloan::Call::dissolve { .. } | + crowdloan::Call::edit { .. } | + crowdloan::Call::poke { .. } | + crowdloan::Call::contribute_all { .. }, + ) | RuntimeCall::Staking( pallet_staking::Call::bond { .. } | pallet_staking::Call::bond_extra { .. } | diff --git a/runtime/rococo/src/xcm_config.rs b/runtime/rococo/src/xcm_config.rs index 73408566b408..7b864939bdb5 100644 --- a/runtime/rococo/src/xcm_config.rs +++ b/runtime/rococo/src/xcm_config.rs @@ -26,7 +26,7 @@ use frame_support::{ weights::Weight, }; use frame_system::EnsureRoot; -use runtime_common::{paras_registrar, xcm_sender, ToAuthor}; +use runtime_common::{crowdloan, paras_registrar, xcm_sender, ToAuthor}; use sp_core::ConstU32; use xcm::latest::prelude::*; use xcm_builder::{ @@ -167,6 +167,16 @@ impl Contains for SafeCallFilter { RuntimeCall::Timestamp(..) | RuntimeCall::Indices(..) | RuntimeCall::Balances(..) | + RuntimeCall::Crowdloan( + crowdloan::Call::create { .. } | + crowdloan::Call::contribute { .. } | + crowdloan::Call::withdraw { .. } | + crowdloan::Call::refund { .. } | + crowdloan::Call::dissolve { .. } | + crowdloan::Call::edit { .. } | + crowdloan::Call::poke { .. } | + crowdloan::Call::contribute_all { .. }, + ) | RuntimeCall::Session(pallet_session::Call::purge_keys { .. }) | RuntimeCall::Grandpa(..) | RuntimeCall::ImOnline(..) | diff --git a/runtime/westend/src/xcm_config.rs b/runtime/westend/src/xcm_config.rs index 411291c3e7f8..834472f5fb2c 100644 --- a/runtime/westend/src/xcm_config.rs +++ b/runtime/westend/src/xcm_config.rs @@ -25,7 +25,7 @@ use frame_support::{ traits::{Contains, Everything, Nothing}, }; use frame_system::EnsureRoot; -use runtime_common::{paras_registrar, xcm_sender, ToAuthor}; +use runtime_common::{crowdloan, paras_registrar, xcm_sender, ToAuthor}; use sp_core::ConstU32; use xcm::latest::prelude::*; use xcm_builder::{ @@ -139,6 +139,16 @@ impl Contains for SafeCallFilter { RuntimeCall::Timestamp(..) | RuntimeCall::Indices(..) | RuntimeCall::Balances(..) | + RuntimeCall::Crowdloan( + crowdloan::Call::create { .. } | + crowdloan::Call::contribute { .. } | + crowdloan::Call::withdraw { .. } | + crowdloan::Call::refund { .. } | + crowdloan::Call::dissolve { .. } | + crowdloan::Call::edit { .. } | + crowdloan::Call::poke { .. } | + crowdloan::Call::contribute_all { .. }, + ) | RuntimeCall::Staking( pallet_staking::Call::bond { .. } | pallet_staking::Call::bond_extra { .. } |