Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
XCM: Add HRMP to SafeCallFilter (#6606)
Browse files Browse the repository at this point in the history
* XCM: Add HRMP to SafeCallFilter

* Whitelist several paras_registrar calls
  • Loading branch information
KiChjang committed Jan 23, 2023
1 parent 281ec19 commit 7129e9b
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
10 changes: 9 additions & 1 deletion runtime/kusama/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use frame_support::{
traits::{Contains, Everything, Nothing},
weights::Weight,
};
use runtime_common::{xcm_sender, ToAuthor};
use runtime_common::{paras_registrar, xcm_sender, ToAuthor};
use sp_core::ConstU32;
use xcm::latest::prelude::*;
use xcm_builder::{
Expand Down Expand Up @@ -326,6 +326,14 @@ impl Contains<RuntimeCall> for SafeCallFilter {
pallet_nomination_pools::Call::update_roles { .. } |
pallet_nomination_pools::Call::chill { .. },
) |
RuntimeCall::Hrmp(..) |
RuntimeCall::Registrar(
paras_registrar::Call::deregister { .. } |
paras_registrar::Call::swap { .. } |
paras_registrar::Call::remove_lock { .. } |
paras_registrar::Call::reserve { .. } |
paras_registrar::Call::add_lock { .. },
) |
RuntimeCall::XcmPallet(pallet_xcm::Call::limited_reserve_transfer_assets {
..
}) => true,
Expand Down
10 changes: 9 additions & 1 deletion runtime/polkadot/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use frame_support::{
traits::{Contains, Everything, Nothing},
weights::Weight,
};
use runtime_common::{xcm_sender, ToAuthor};
use runtime_common::{paras_registrar, xcm_sender, ToAuthor};
use sp_core::ConstU32;
use xcm::latest::prelude::*;
use xcm_builder::{
Expand Down Expand Up @@ -290,6 +290,14 @@ impl Contains<RuntimeCall> for SafeCallFilter {
pallet_nomination_pools::Call::update_roles { .. } |
pallet_nomination_pools::Call::chill { .. },
) |
RuntimeCall::Hrmp(..) |
RuntimeCall::Registrar(
paras_registrar::Call::deregister { .. } |
paras_registrar::Call::swap { .. } |
paras_registrar::Call::remove_lock { .. } |
paras_registrar::Call::reserve { .. } |
paras_registrar::Call::add_lock { .. },
) |
RuntimeCall::XcmPallet(pallet_xcm::Call::limited_reserve_transfer_assets {
..
}) => true,
Expand Down
10 changes: 9 additions & 1 deletion runtime/rococo/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use frame_support::{
traits::{Contains, Everything, Nothing},
weights::Weight,
};
use runtime_common::{xcm_sender, ToAuthor};
use runtime_common::{paras_registrar, xcm_sender, ToAuthor};
use sp_core::ConstU32;
use xcm::latest::prelude::*;
use xcm_builder::{
Expand Down Expand Up @@ -261,6 +261,14 @@ impl Contains<RuntimeCall> for SafeCallFilter {
pallet_bounties::Call::close_bounty { .. },
) |
RuntimeCall::ChildBounties(..) |
RuntimeCall::Hrmp(..) |
RuntimeCall::Registrar(
paras_registrar::Call::deregister { .. } |
paras_registrar::Call::swap { .. } |
paras_registrar::Call::remove_lock { .. } |
paras_registrar::Call::reserve { .. } |
paras_registrar::Call::add_lock { .. },
) |
RuntimeCall::XcmPallet(pallet_xcm::Call::limited_reserve_transfer_assets {
..
}) => true,
Expand Down
10 changes: 9 additions & 1 deletion runtime/westend/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use frame_support::{
parameter_types,
traits::{Contains, Everything, Nothing},
};
use runtime_common::{xcm_sender, ToAuthor};
use runtime_common::{paras_registrar, xcm_sender, ToAuthor};
use sp_core::ConstU32;
use xcm::latest::prelude::*;
use xcm_builder::{
Expand Down Expand Up @@ -201,6 +201,14 @@ impl Contains<RuntimeCall> for SafeCallFilter {
pallet_nomination_pools::Call::update_roles { .. } |
pallet_nomination_pools::Call::chill { .. },
) |
RuntimeCall::Hrmp(..) |
RuntimeCall::Registrar(
paras_registrar::Call::deregister { .. } |
paras_registrar::Call::swap { .. } |
paras_registrar::Call::remove_lock { .. } |
paras_registrar::Call::reserve { .. } |
paras_registrar::Call::add_lock { .. },
) |
RuntimeCall::XcmPallet(pallet_xcm::Call::limited_reserve_transfer_assets {
..
}) => true,
Expand Down

0 comments on commit 7129e9b

Please sign in to comment.