mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 22:11:02 +00:00
Added AllSiblingSystemParachains matcher to be used at a parachain level (#2422)
As suggested in this thread: https://github.com/polkadot-fellows/runtimes/pull/87#discussion_r1400237122 We already have the `IsChildSystemParachain`, which may be used at relay chain, but it can't be used at a parachain level. So let's use `AllSiblingSystemParachains` for that. I was thinking about `AllSystemParachains`, but it may cause wrong impression that it can be used at a relay chain level. --------- Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
4df313fbc7
commit
0b3d0677f8
@@ -27,11 +27,12 @@ use frame_system::EnsureRoot;
|
||||
use pallet_xcm::XcmPassthrough;
|
||||
use parachains_common::{
|
||||
impls::ToStakingPot,
|
||||
xcm_config::{ConcreteAssetFromSystem, RelayOrOtherSystemParachains},
|
||||
xcm_config::{
|
||||
AllSiblingSystemParachains, ConcreteAssetFromSystem, RelayOrOtherSystemParachains,
|
||||
},
|
||||
};
|
||||
use polkadot_parachain_primitives::primitives::Sibling;
|
||||
use polkadot_runtime_common::xcm_sender::ExponentialPrice;
|
||||
use westend_runtime_constants::system_parachain;
|
||||
use xcm::latest::prelude::*;
|
||||
use xcm_builder::{
|
||||
AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses,
|
||||
@@ -250,24 +251,13 @@ pub type Barrier = TrailingSetTopicAsId<
|
||||
>,
|
||||
>;
|
||||
|
||||
match_types! {
|
||||
pub type SystemParachains: impl Contains<MultiLocation> = {
|
||||
MultiLocation {
|
||||
parents: 1,
|
||||
interior: X1(Parachain(
|
||||
system_parachain::ASSET_HUB_ID |
|
||||
system_parachain::BRIDGE_HUB_ID |
|
||||
system_parachain::COLLECTIVES_ID
|
||||
)),
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/// Locations that will not be charged fees in the executor,
|
||||
/// either execution or delivery.
|
||||
/// We only waive fees for system functions, which these locations represent.
|
||||
pub type WaivedLocations =
|
||||
(RelayOrOtherSystemParachains<SystemParachains, Runtime>, Equals<RelayTreasuryLocation>);
|
||||
pub type WaivedLocations = (
|
||||
RelayOrOtherSystemParachains<AllSiblingSystemParachains, Runtime>,
|
||||
Equals<RelayTreasuryLocation>,
|
||||
);
|
||||
|
||||
/// Cases where a remote origin is accepted as trusted Teleporter for a given asset:
|
||||
/// - DOT with the parent Relay Chain and sibling parachains.
|
||||
|
||||
Reference in New Issue
Block a user