git.delta.rocks / unique-network / refs/commits / b486d2001581

difftreelog

fix RelayNetwork for Quartz

Daniel Shiposha2023-01-25parent: #2477690.patch.diff
in: master

4 files changed

modifiedruntime/common/config/xcm/mod.rsdiffbeforeafterboth
--- a/runtime/common/config/xcm/mod.rs
+++ b/runtime/common/config/xcm/mod.rs
@@ -21,7 +21,7 @@
 use frame_system::EnsureRoot;
 use pallet_xcm::XcmPassthrough;
 use polkadot_parachain::primitives::Sibling;
-use xcm::latest::{prelude::*, Weight, MultiLocation, NetworkId};
+use xcm::latest::{prelude::*, Weight, MultiLocation};
 use xcm_builder::{
 	AccountId32Aliases, EnsureXcmOrigin, FixedWeightBounds, LocationInverter, ParentAsSuperuser,
 	RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
@@ -31,7 +31,7 @@
 use sp_std::{marker::PhantomData, vec::Vec};
 use crate::{
 	Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, ParachainInfo, ParachainSystem, PolkadotXcm,
-	XcmpQueue, xcm_barrier::Barrier,
+	XcmpQueue, xcm_barrier::Barrier, RelayNetwork,
 };
 
 use up_common::types::AccountId;
@@ -52,7 +52,6 @@
 
 parameter_types! {
 	pub const RelayLocation: MultiLocation = MultiLocation::parent();
-	pub const RelayNetwork: NetworkId = NetworkId::Polkadot;
 	pub RelayOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into();
 	pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into();
 	pub SelfLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::get().into())));
modifiedruntime/opal/src/lib.rsdiffbeforeafterboth
3434
35use up_common::types::*;35use up_common::types::*;
36
37use ::xcm::latest::NetworkId;
3638
37#[path = "../../common/mod.rs"]39#[path = "../../common/mod.rs"]
38mod runtime_common;40mod runtime_common;
63 pub const Version: RuntimeVersion = VERSION;65 pub const Version: RuntimeVersion = VERSION;
64 pub const SS58Prefix: u16 = 42;66 pub const SS58Prefix: u16 = 42;
65 pub const ChainId: u64 = 8882;67 pub const ChainId: u64 = 8882;
68 pub const RelayNetwork: NetworkId = NetworkId::Kusama;
66}69}
6770
68construct_runtime!();71construct_runtime!();
modifiedruntime/quartz/src/lib.rsdiffbeforeafterboth
--- a/runtime/quartz/src/lib.rs
+++ b/runtime/quartz/src/lib.rs
@@ -34,6 +34,8 @@
 
 use up_common::types::*;
 
+use ::xcm::latest::NetworkId;
+
 #[path = "../../common/mod.rs"]
 mod runtime_common;
 
@@ -64,6 +66,7 @@
 
 parameter_types! {
 	pub const Version: RuntimeVersion = VERSION;
+	pub const RelayNetwork: NetworkId = NetworkId::Kusama;
 }
 #[cfg(feature = "become-sapphire")]
 parameter_types! {
modifiedruntime/unique/src/lib.rsdiffbeforeafterboth
--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -34,6 +34,8 @@
 
 use up_common::types::*;
 
+use ::xcm::latest::NetworkId;
+
 #[path = "../../common/mod.rs"]
 mod runtime_common;
 
@@ -63,6 +65,7 @@
 	pub const Version: RuntimeVersion = VERSION;
 	pub const SS58Prefix: u16 = 7391;
 	pub const ChainId: u64 = 8880;
+	pub const RelayNetwork: NetworkId = NetworkId::Polkadot;
 }
 
 construct_runtime!();