Skip to content

Commit

Permalink
adds chainspec for composable westend (#731) (#732)
Browse files Browse the repository at this point in the history
* adds chainspec for composable wested

* cargo fmt

Co-authored-by: Seun Lanlege <[email protected]>
  • Loading branch information
composable-sre and seunlanlege authored Mar 8, 2022
1 parent e95c593 commit d57e43f
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 208 deletions.
19 changes: 6 additions & 13 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,27 +55,20 @@ where
MultiSigner::from(from_seed::<TPublic>(seed)).into_account()
}

#[cfg(feature = "dali")]
/// Dali (westend parachain)
pub fn dali_westend() -> dali::ChainSpec {
dali::ChainSpec::from_json_bytes(include_bytes!("res/dali-westend.json").to_vec())
.expect("Dali chain spec not found!")
#[cfg(feature = "composable")]
/// Composable (Westend parachain)
pub fn composable_westend() -> composable::ChainSpec {
composable::ChainSpec::from_json_bytes(include_bytes!("res/composable-westend.json").to_vec())
.expect("composable-westend chain spec not found!")
}

#[cfg(feature = "dali")]
/// Dali (rococo parachain)
/// Dali (Rococo parachain)
pub fn dali_rococo() -> dali::ChainSpec {
dali::ChainSpec::from_json_bytes(include_bytes!("./res/dali-rococo.json").to_vec())
.expect("Dali chain spec not found!")
}

#[cfg(feature = "dali")]
/// Dali (chachacha parachain)
pub fn dali_chachacha() -> dali::ChainSpec {
dali::ChainSpec::from_json_bytes(include_bytes!("./res/dali-chachacha.json").to_vec())
.expect("Dali chain spec not found!")
}

/// Picasso (Kusama parachain)
pub fn picasso() -> picasso::ChainSpec {
picasso::ChainSpec::from_json_bytes(include_bytes!("./res/picasso.json").to_vec())
Expand Down
8 changes: 2 additions & 6 deletions node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,13 @@ fn load_spec(id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, St
"picasso-dev" => Box::new(chain_spec::picasso_dev()),
#[cfg(feature = "composable")]
"composable-dev" => Box::new(chain_spec::composable_dev()),
// Dali (Westend Relay)
#[cfg(feature = "dali")]
"dali-westend" => Box::new(chain_spec::dali_westend()),
// Dali (Rococo Relay)
#[cfg(feature = "dali")]
"dali-rococo" => Box::new(chain_spec::dali_rococo()),
// Dali (Chachacha Relay)
#[cfg(feature = "dali")]
"dali" | "dali-chachacha" => Box::new(chain_spec::dali_chachacha()),
// Picasso (Kusama Relay)
"picasso" => Box::new(chain_spec::picasso()),
// Composable (Westend Relay)
"composable-westend" => Box::new(chain_spec::composable_westend()),
// Composable (Polkadot Relay)
#[cfg(feature = "composable")]
"" | "composable" => Box::new(chain_spec::composable()),
Expand Down
96 changes: 96 additions & 0 deletions node/src/res/composable-westend.json

Large diffs are not rendered by default.

101 changes: 0 additions & 101 deletions node/src/res/dali-chachacha.json

This file was deleted.

88 changes: 0 additions & 88 deletions node/src/res/dali-westend.json

This file was deleted.

0 comments on commit d57e43f

Please sign in to comment.