difftreelog
fix RelayNetwork for Quartz
in: master
4 files changed
runtime/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())));
runtime/opal/src/lib.rsdiffbeforeafterboth--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/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 = 42;
pub const ChainId: u64 = 8882;
+ pub const RelayNetwork: NetworkId = NetworkId::Kusama;
}
construct_runtime!();
runtime/quartz/src/lib.rsdiffbeforeafterboth1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617//! The Substrate Node Template runtime. This can be compiled with `#[no_std]`, ready for Wasm.1819#![cfg_attr(not(feature = "std"), no_std)]20// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.21#![recursion_limit = "1024"]22#![allow(clippy::from_over_into, clippy::identity_op)]23#![allow(clippy::fn_to_numeric_cast_with_truncation)]24// Make the WASM binary available.25#[cfg(feature = "std")]26include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));2728extern crate alloc;2930use frame_support::parameter_types;3132use sp_version::RuntimeVersion;33use sp_runtime::create_runtime_str;3435use up_common::types::*;3637use ::xcm::latest::NetworkId;3839#[path = "../../common/mod.rs"]40mod runtime_common;4142pub mod xcm_barrier;4344#[cfg(test)]45mod tests;4647pub use runtime_common::*;4849#[cfg(feature = "become-sapphire")]50pub const RUNTIME_NAME: &str = "sapphire";51#[cfg(not(feature = "become-sapphire"))]52pub const RUNTIME_NAME: &str = "quartz";53pub const TOKEN_SYMBOL: &str = "QTZ";5455/// This runtime version.56pub const VERSION: RuntimeVersion = RuntimeVersion {57 spec_name: create_runtime_str!(RUNTIME_NAME),58 impl_name: create_runtime_str!(RUNTIME_NAME),59 authoring_version: 1,60 spec_version: 936050,61 impl_version: 0,62 apis: RUNTIME_API_VERSIONS,63 transaction_version: 3,64 state_version: 0,65};6667parameter_types! {68 pub const Version: RuntimeVersion = VERSION;69 pub const RelayNetwork: NetworkId = NetworkId::Kusama;70}71#[cfg(feature = "become-sapphire")]72parameter_types! {73 pub const SS58Prefix: u16 = 8883;74 pub const ChainId: u64 = 8883;75}7677#[cfg(not(feature = "become-sapphire"))]78parameter_types! {79 pub const SS58Prefix: u8 = 255;80 pub const ChainId: u64 = 8881;81}8283construct_runtime!();8485impl_common_runtime_apis!();8687cumulus_pallet_parachain_system::register_validate_block!(88 Runtime = Runtime,89 BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::<Runtime, Executive>,90 CheckInherents = CheckInherents,91);runtime/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!();