From b668b876f1d2184801dced053f0ff3d5e69fba9d Mon Sep 17 00:00:00 2001 From: hqwangningbo <2536935847@qq.com> Date: Fri, 17 Mar 2023 18:57:12 +0800 Subject: [PATCH 1/2] Add crowdloan to SafeCallFilter --- runtime/kusama/src/xcm_config.rs | 1 + runtime/polkadot/src/xcm_config.rs | 1 + runtime/rococo/src/xcm_config.rs | 1 + runtime/westend/src/xcm_config.rs | 1 + 4 files changed, 4 insertions(+) diff --git a/runtime/kusama/src/xcm_config.rs b/runtime/kusama/src/xcm_config.rs index 33ca3a810aea..bfa4cb2150e7 100644 --- a/runtime/kusama/src/xcm_config.rs +++ b/runtime/kusama/src/xcm_config.rs @@ -172,6 +172,7 @@ impl Contains for SafeCallFilter { RuntimeCall::Timestamp(..) | RuntimeCall::Indices(..) | RuntimeCall::Balances(..) | + RuntimeCall::Crowdloan(..) | 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 4f817093703a..951c4e28c159 100644 --- a/runtime/polkadot/src/xcm_config.rs +++ b/runtime/polkadot/src/xcm_config.rs @@ -168,6 +168,7 @@ impl Contains for SafeCallFilter { RuntimeCall::Timestamp(..) | RuntimeCall::Indices(..) | RuntimeCall::Balances(..) | + RuntimeCall::Crowdloan(..) | 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 229df3a5df95..2bc7ce9f07f0 100644 --- a/runtime/rococo/src/xcm_config.rs +++ b/runtime/rococo/src/xcm_config.rs @@ -166,6 +166,7 @@ impl Contains for SafeCallFilter { RuntimeCall::Timestamp(..) | RuntimeCall::Indices(..) | RuntimeCall::Balances(..) | + RuntimeCall::Crowdloan(..) | 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 ef38ca5d2970..788b2838145f 100644 --- a/runtime/westend/src/xcm_config.rs +++ b/runtime/westend/src/xcm_config.rs @@ -138,6 +138,7 @@ impl Contains for SafeCallFilter { RuntimeCall::Timestamp(..) | RuntimeCall::Indices(..) | RuntimeCall::Balances(..) | + RuntimeCall::Crowdloan(..) | RuntimeCall::Staking( pallet_staking::Call::bond { .. } | pallet_staking::Call::bond_extra { .. } | From 9942e74266f7583869882c149200bac6027b6067 Mon Sep 17 00:00:00 2001 From: hqwangningbo <2536935847@qq.com> Date: Tue, 21 Mar 2023 17:35:10 +0800 Subject: [PATCH 2/2] Add crowdloan to SafeCallFilter --- runtime/kusama/src/xcm_config.rs | 13 +++++++++++-- runtime/polkadot/src/xcm_config.rs | 13 +++++++++++-- runtime/rococo/src/xcm_config.rs | 13 +++++++++++-- runtime/westend/src/xcm_config.rs | 13 +++++++++++-- 4 files changed, 44 insertions(+), 8 deletions(-) diff --git a/runtime/kusama/src/xcm_config.rs b/runtime/kusama/src/xcm_config.rs index bfa4cb2150e7..b67ade4a1574 100644 --- a/runtime/kusama/src/xcm_config.rs +++ b/runtime/kusama/src/xcm_config.rs @@ -26,7 +26,7 @@ use frame_support::{ traits::{Contains, Everything, Nothing}, weights::Weight, }; -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,7 +172,16 @@ impl Contains for SafeCallFilter { RuntimeCall::Timestamp(..) | RuntimeCall::Indices(..) | RuntimeCall::Balances(..) | - RuntimeCall::Crowdloan(..) | + 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 951c4e28c159..fffe82016d71 100644 --- a/runtime/polkadot/src/xcm_config.rs +++ b/runtime/polkadot/src/xcm_config.rs @@ -25,7 +25,7 @@ use frame_support::{ traits::{Contains, Everything, Nothing}, weights::Weight, }; -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::{ @@ -168,7 +168,16 @@ impl Contains for SafeCallFilter { RuntimeCall::Timestamp(..) | RuntimeCall::Indices(..) | RuntimeCall::Balances(..) | - RuntimeCall::Crowdloan(..) | + 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 2bc7ce9f07f0..70f0de0fb15b 100644 --- a/runtime/rococo/src/xcm_config.rs +++ b/runtime/rococo/src/xcm_config.rs @@ -25,7 +25,7 @@ use frame_support::{ traits::{Contains, Everything, Nothing}, weights::Weight, }; -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::{ @@ -166,7 +166,16 @@ impl Contains for SafeCallFilter { RuntimeCall::Timestamp(..) | RuntimeCall::Indices(..) | RuntimeCall::Balances(..) | - RuntimeCall::Crowdloan(..) | + 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 788b2838145f..ee31a3c5f0b6 100644 --- a/runtime/westend/src/xcm_config.rs +++ b/runtime/westend/src/xcm_config.rs @@ -24,7 +24,7 @@ use frame_support::{ parameter_types, traits::{Contains, Everything, Nothing}, }; -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::{ @@ -138,7 +138,16 @@ impl Contains for SafeCallFilter { RuntimeCall::Timestamp(..) | RuntimeCall::Indices(..) | RuntimeCall::Balances(..) | - RuntimeCall::Crowdloan(..) | + 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 { .. } |