Skip to content

Commit

Permalink
Merge pull request #109 from paseo-network/al3mart/feat-bridge-hub-specs
Browse files Browse the repository at this point in the history
Bridge hub specs
  • Loading branch information
hbulgarini authored Jul 31, 2024
2 parents 89ee135 + f24489b commit 836d979
Show file tree
Hide file tree
Showing 6 changed files with 358 additions and 5 deletions.
10 changes: 7 additions & 3 deletions chain-spec-generator/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

use crate::{
relay_chain_specs::PaseoChainSpec,
//system_parachains_specs::{AssetHubPaseoChainSpec},
system_parachains_specs::{AssetHubPaseoChainSpec, BridgeHubPaseoChainSpec},
ChainSpec,
};
use polkadot_primitives::{AccountId, AccountPublic};
Expand Down Expand Up @@ -71,8 +71,12 @@ pub fn from_json_file(filepath: &str, supported: String) -> Result<Box<dyn Chain
x if x.starts_with("paseo") | x.starts_with("dot") => {
Ok(Box::new(PaseoChainSpec::from_json_file(path)?))
},
/* x if x.starts_with("asset-hub-paseo") =>
Ok(Box::new(AssetHubPolkadotChainSpec::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("bridge-hub-paseo") => {
Ok(Box::new(BridgeHubPaseoChainSpec::from_json_file(path)?))
},
_ => Err(format!("Unknown chain 'id' in json file. Only supported: {supported}'")),
}
}
4 changes: 2 additions & 2 deletions chain-spec-generator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ fn main() -> Result<(), String> {
print!("{chain_spec}");
Ok(())
} else {
let supported = supported_chains.keys().enumerate().fold(String::new(), |c, (n, k)| {
let extra = (n + 1 < supported_chains.len()).then(|| ", ").unwrap_or("");
let supported = supported_chains.keys().enumerate().fold(String::new(), |c, (n, k)| {
let extra = if n + 1 < supported_chains.len() { ", " } else { "" };
format!("{c}{k}{extra}")
});
if cli.chain.ends_with(".json") {
Expand Down
111 changes: 111 additions & 0 deletions chain-specs/bridge-hub-paseo-local.plain.json

Large diffs are not rendered by default.

86 changes: 86 additions & 0 deletions chain-specs/bridge-hub-paseo-local.raw.json

Large diffs are not rendered by default.

75 changes: 75 additions & 0 deletions chain-specs/bridge-hub-paseo.plain.json

Large diffs are not rendered by default.

77 changes: 77 additions & 0 deletions chain-specs/bridge-hub-paseo.raw.json

Large diffs are not rendered by default.

0 comments on commit 836d979

Please sign in to comment.