From 313b81aa2b2cb076b4f99c9b2bea040a8bcf709f Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Andres <11448715+al3mart@users.noreply.github.com> Date: Mon, 9 Dec 2024 19:37:17 +0100 Subject: [PATCH] chore(genesis): add hrmp to genesis --- chain-spec-generator/src/common.rs | 31 +++++++++++++---------- chain-spec-generator/src/main.rs | 3 ++- relay/paseo/src/genesis_config_presets.rs | 11 +++++--- 3 files changed, 27 insertions(+), 18 deletions(-) diff --git a/chain-spec-generator/src/common.rs b/chain-spec-generator/src/common.rs index 18f88f4..0a758d7 100644 --- a/chain-spec-generator/src/common.rs +++ b/chain-spec-generator/src/common.rs @@ -16,10 +16,10 @@ // along with Polkadot. If not, see . use crate::{ - relay_chain_specs::{PaseoChainSpec}, + relay_chain_specs::PaseoChainSpec, system_parachains_specs::{ - AssetHubPaseoChainSpec, - BridgeHubPaseoChainSpec,CoretimePaseoChainSpec,PeoplePaseoChainSpec, + AssetHubPaseoChainSpec, BridgeHubPaseoChainSpec, CoretimePaseoChainSpec, + PeoplePaseoChainSpec, }, ChainSpec, }; @@ -36,16 +36,21 @@ pub fn from_json_file(filepath: &str, supported: String) -> Result - Ok(Box::new(PaseoChainSpec::from_json_file(path)?)), - x if x.starts_with("asset-hub-paseo") => - Ok(Box::new(AssetHubPaseoChainSpec::from_json_file(path)?)), - x if x.starts_with("paseo-bridge-hub") => - Ok(Box::new(BridgeHubPaseoChainSpec::from_json_file(path)?)), - x if x.starts_with("paseo-coretime") => - Ok(Box::new(CoretimePaseoChainSpec::from_json_file(path)?)), - x if x.starts_with("paseo-people") => - Ok(Box::new(PeoplePaseoChainSpec::from_json_file(path)?)), + x if x.eq("paseo") | x.eq("paseo-local") | x.eq("paseo-dev") => { + Ok(Box::new(PaseoChainSpec::from_json_file(path)?)) + }, + x if x.starts_with("asset-hub-paseo") => { + Ok(Box::new(AssetHubPaseoChainSpec::from_json_file(path)?)) + }, + x if x.starts_with("paseo-bridge-hub") => { + Ok(Box::new(BridgeHubPaseoChainSpec::from_json_file(path)?)) + }, + x if x.starts_with("paseo-coretime") => { + Ok(Box::new(CoretimePaseoChainSpec::from_json_file(path)?)) + }, + x if x.starts_with("paseo-people") => { + Ok(Box::new(PeoplePaseoChainSpec::from_json_file(path)?)) + }, _ => Err(format!("Unknown chain 'id' in json file. Only supported: {supported}'")), } } diff --git a/chain-spec-generator/src/main.rs b/chain-spec-generator/src/main.rs index c8d7b38..2b226d2 100644 --- a/chain-spec-generator/src/main.rs +++ b/chain-spec-generator/src/main.rs @@ -56,7 +56,8 @@ fn main() -> Result<(), String> { ), ( "coretime-paseo-local", - Box::new(|| system_parachains_specs::coretime_paseo_local_testnet_config()) as Box<_>, + Box::new(|| system_parachains_specs::coretime_paseo_local_testnet_config()) + as Box<_>, ), ( "coretime-paseo-tot", diff --git a/relay/paseo/src/genesis_config_presets.rs b/relay/paseo/src/genesis_config_presets.rs index 5335d07..5002827 100644 --- a/relay/paseo/src/genesis_config_presets.rs +++ b/relay/paseo/src/genesis_config_presets.rs @@ -104,16 +104,16 @@ fn default_parachains_host_configuration() -> HostConfiguration::new(), + } }) }