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

XCM: Add HRMP to SafeCallFilter #6606

Merged
merged 2 commits into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 { .. } |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Being here is just about "we consider the weight of these functions okay", right? there's still barriers and more to prevent actual execution based on chain?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there is also the extrinsic itself that checks whether the FRAME origin is what it expects.

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