XCM: Add HRMP to SafeCallFilter (#6606)

* XCM: Add HRMP to SafeCallFilter

* Whitelist several paras_registrar calls
This commit is contained in:
Keith Yeung
2023-01-24 07:19:45 +09:00
committed by GitHub
parent c4d4209dfb
commit c26a7532c9
4 changed files with 36 additions and 4 deletions
+9 -1
View File
@@ -26,7 +26,7 @@ use frame_support::{
traits::{Contains, Everything, Nothing}, traits::{Contains, Everything, Nothing},
weights::Weight, weights::Weight,
}; };
use runtime_common::{xcm_sender, ToAuthor}; use runtime_common::{paras_registrar, xcm_sender, ToAuthor};
use sp_core::ConstU32; use sp_core::ConstU32;
use xcm::latest::prelude::*; use xcm::latest::prelude::*;
use xcm_builder::{ use xcm_builder::{
@@ -326,6 +326,14 @@ impl Contains<RuntimeCall> for SafeCallFilter {
pallet_nomination_pools::Call::update_roles { .. } | pallet_nomination_pools::Call::update_roles { .. } |
pallet_nomination_pools::Call::chill { .. }, 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 { RuntimeCall::XcmPallet(pallet_xcm::Call::limited_reserve_transfer_assets {
.. ..
}) => true, }) => true,
+9 -1
View File
@@ -25,7 +25,7 @@ use frame_support::{
traits::{Contains, Everything, Nothing}, traits::{Contains, Everything, Nothing},
weights::Weight, weights::Weight,
}; };
use runtime_common::{xcm_sender, ToAuthor}; use runtime_common::{paras_registrar, xcm_sender, ToAuthor};
use sp_core::ConstU32; use sp_core::ConstU32;
use xcm::latest::prelude::*; use xcm::latest::prelude::*;
use xcm_builder::{ use xcm_builder::{
@@ -290,6 +290,14 @@ impl Contains<RuntimeCall> for SafeCallFilter {
pallet_nomination_pools::Call::update_roles { .. } | pallet_nomination_pools::Call::update_roles { .. } |
pallet_nomination_pools::Call::chill { .. }, 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 { RuntimeCall::XcmPallet(pallet_xcm::Call::limited_reserve_transfer_assets {
.. ..
}) => true, }) => true,
+9 -1
View File
@@ -25,7 +25,7 @@ use frame_support::{
traits::{Contains, Everything, Nothing}, traits::{Contains, Everything, Nothing},
weights::Weight, weights::Weight,
}; };
use runtime_common::{xcm_sender, ToAuthor}; use runtime_common::{paras_registrar, xcm_sender, ToAuthor};
use sp_core::ConstU32; use sp_core::ConstU32;
use xcm::latest::prelude::*; use xcm::latest::prelude::*;
use xcm_builder::{ use xcm_builder::{
@@ -261,6 +261,14 @@ impl Contains<RuntimeCall> for SafeCallFilter {
pallet_bounties::Call::close_bounty { .. }, pallet_bounties::Call::close_bounty { .. },
) | ) |
RuntimeCall::ChildBounties(..) | 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 { RuntimeCall::XcmPallet(pallet_xcm::Call::limited_reserve_transfer_assets {
.. ..
}) => true, }) => true,
+9 -1
View File
@@ -24,7 +24,7 @@ use frame_support::{
parameter_types, parameter_types,
traits::{Contains, Everything, Nothing}, traits::{Contains, Everything, Nothing},
}; };
use runtime_common::{xcm_sender, ToAuthor}; use runtime_common::{paras_registrar, xcm_sender, ToAuthor};
use sp_core::ConstU32; use sp_core::ConstU32;
use xcm::latest::prelude::*; use xcm::latest::prelude::*;
use xcm_builder::{ use xcm_builder::{
@@ -201,6 +201,14 @@ impl Contains<RuntimeCall> for SafeCallFilter {
pallet_nomination_pools::Call::update_roles { .. } | pallet_nomination_pools::Call::update_roles { .. } |
pallet_nomination_pools::Call::chill { .. }, 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 { RuntimeCall::XcmPallet(pallet_xcm::Call::limited_reserve_transfer_assets {
.. ..
}) => true, }) => true,