From 52e87d4f364c2119c75bd2ac5080b93db6173760 Mon Sep 17 00:00:00 2001 From: Alessandro Siniscalchi Date: Mon, 14 Oct 2024 10:58:44 +0200 Subject: [PATCH] Add paseo feature and update runtime and package versions (#814) * using paseo genesis and version * cargo.lock * lint --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- e2e-tests/tests/config.ts | 2 +- runtime/laos/Cargo.toml | 1 + runtime/laos/src/configs/xcm_config.rs | 7 ++++++- runtime/laos/src/lib.rs | 2 +- xcm-simulator/src/tests/mod.rs | 2 +- 7 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7a5bc562..4ee07f86 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5202,7 +5202,7 @@ dependencies = [ [[package]] name = "laos" -version = "0.22.90" +version = "0.22.91" dependencies = [ "clap", "cumulus-client-cli", @@ -5285,7 +5285,7 @@ dependencies = [ [[package]] name = "laos-runtime" -version = "0.22.90" +version = "0.22.91" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", diff --git a/Cargo.toml b/Cargo.toml index 72a3305f..341551fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ repository = "https://github.com/freeverseio/laos.git" homepage = "https://www.laosfoundation.io" authors = ["Freeverse"] edition = "2021" -version = "0.22.90" +version = "0.22.91" [workspace] resolver = "2" diff --git a/e2e-tests/tests/config.ts b/e2e-tests/tests/config.ts index e9e0538e..8d36930a 100644 --- a/e2e-tests/tests/config.ts +++ b/e2e-tests/tests/config.ts @@ -8,7 +8,7 @@ import ParachainStaking from "../build/contracts/ParachainStaking.json"; // Node config export const RUNTIME_SPEC_NAME = "laos"; -export const RUNTIME_SPEC_VERSION = 2290; +export const RUNTIME_SPEC_VERSION = 2291; export const RUNTIME_IMPL_VERSION = 0; export const LOCAL_NODE_URL = "http://127.0.0.1:9999"; diff --git a/runtime/laos/Cargo.toml b/runtime/laos/Cargo.toml index 74110597..a38d5c45 100644 --- a/runtime/laos/Cargo.toml +++ b/runtime/laos/Cargo.toml @@ -120,6 +120,7 @@ test-utils = { workspace = true } ethereum = { workspace = true } [features] +paseo=[] fast-runtime=[] default = [ "std", diff --git a/runtime/laos/src/configs/xcm_config.rs b/runtime/laos/src/configs/xcm_config.rs index a262faa2..84741a6f 100644 --- a/runtime/laos/src/configs/xcm_config.rs +++ b/runtime/laos/src/configs/xcm_config.rs @@ -40,12 +40,17 @@ use xcm_builder::{ use xcm_executor::XcmExecutor; pub const ASSET_HUB_ID: u32 = 1000; +#[cfg(not(feature = "paseo"))] +pub const RELAY_NETWORK: NetworkId = NetworkId::Polkadot; +#[cfg(feature = "paseo")] +pub const RELAY_NETWORK: NetworkId = + NetworkId::ByGenesis(hex!("77afd6190f1554ad45fd0d31aee62aacc33c6db0ea801129acb813f913e0764f")); parameter_types! { // Represents the location of the Relay Chain (parent in the XCM hierarchy). pub const RelayLocation: Location = Location::parent(); // Optional network identifier for the Relay Chain; set to `None` for default behavior. - pub const RelayNetwork: NetworkId = NetworkId::Polkadot; + pub const RelayNetwork: NetworkId = RELAY_NETWORK; // Defines the origin for messages coming from the Relay Chain. pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); // For the real deployment, it is recommended to set `RelayNetwork` according to the relay chain diff --git a/runtime/laos/src/lib.rs b/runtime/laos/src/lib.rs index cb1605f4..50547ce6 100644 --- a/runtime/laos/src/lib.rs +++ b/runtime/laos/src/lib.rs @@ -83,7 +83,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("laos"), impl_name: create_runtime_str!("laos"), authoring_version: 1, - spec_version: 2290, + spec_version: 2291, impl_version: 0, apis: apis::RUNTIME_API_VERSIONS, transaction_version: 1, diff --git a/xcm-simulator/src/tests/mod.rs b/xcm-simulator/src/tests/mod.rs index 130e6e07..1a7d78c1 100644 --- a/xcm-simulator/src/tests/mod.rs +++ b/xcm-simulator/src/tests/mod.rs @@ -722,7 +722,7 @@ fn teleport_para_teleport_to_para_a() { let amount = 1_000; assert_ok!(ParachainTeleporterPalletXcm::limited_teleport_assets( - parachain_teleporter::RuntimeOrigin::signed(ALICE.into()), + parachain_teleporter::RuntimeOrigin::signed(ALICE), Box::new(Parachain(PARA_A_ID).into()), Box::new(AccountId32 { network: None, id: ALICE.into() }.into()), Box::new((Here, amount).into()),