mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 19:31: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
@@ -17,6 +17,7 @@ sp-weights = { path = "../../../../substrate/primitives/weights", default-featur
|
||||
sp-core = { path = "../../../../substrate/primitives/core", default-features = false }
|
||||
|
||||
xcm = { package = "staging-xcm", path = "../../../xcm", default-features = false }
|
||||
xcm-builder = { package = "staging-xcm-builder", path = "../../../xcm/xcm-builder", default-features = false }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
@@ -27,6 +28,7 @@ std = [
|
||||
"sp-core/std",
|
||||
"sp-runtime/std",
|
||||
"sp-weights/std",
|
||||
"xcm-builder/std",
|
||||
"xcm/std",
|
||||
]
|
||||
|
||||
|
||||
@@ -103,7 +103,8 @@ pub mod fee {
|
||||
|
||||
/// System Parachains.
|
||||
pub mod system_parachain {
|
||||
use xcm::latest::prelude::*;
|
||||
use primitives::Id;
|
||||
use xcm_builder::IsChildSystemParachain;
|
||||
|
||||
/// Network's Asset Hub parachain ID.
|
||||
pub const ASSET_HUB_ID: u32 = 1000;
|
||||
@@ -114,11 +115,8 @@ pub mod system_parachain {
|
||||
/// BridgeHub parachain ID.
|
||||
pub const BRIDGE_HUB_ID: u32 = 1013;
|
||||
|
||||
frame_support::match_types! {
|
||||
pub type SystemParachains: impl Contains<MultiLocation> = {
|
||||
MultiLocation { parents: 0, interior: X1(Parachain(ASSET_HUB_ID | CONTRACTS_ID | ENCOINTER_ID | BRIDGE_HUB_ID)) }
|
||||
};
|
||||
}
|
||||
/// All system parachains of Rococo.
|
||||
pub type SystemParachains = IsChildSystemParachain<Id>;
|
||||
}
|
||||
|
||||
/// Rococo Treasury pallet instance.
|
||||
|
||||
Reference in New Issue
Block a user