Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Symlink chain-specs json files to crate where they are used #2979

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions polkadot-parachain/chain-specs/asset-hub-kusama.json
1 change: 1 addition & 0 deletions polkadot-parachain/chain-specs/asset-hub-polkadot.json
1 change: 1 addition & 0 deletions polkadot-parachain/chain-specs/asset-hub-westend.json
1 change: 1 addition & 0 deletions polkadot-parachain/chain-specs/bridge-hub-kusama.json
1 change: 1 addition & 0 deletions polkadot-parachain/chain-specs/bridge-hub-polkadot.json
1 change: 1 addition & 0 deletions polkadot-parachain/chain-specs/bridge-hub-rococo.json
1 change: 1 addition & 0 deletions polkadot-parachain/chain-specs/bridge-hub-westend.json
1 change: 1 addition & 0 deletions polkadot-parachain/chain-specs/bridge-hub-wococo.json
1 change: 1 addition & 0 deletions polkadot-parachain/chain-specs/collectives-polkadot.json
1 change: 1 addition & 0 deletions polkadot-parachain/chain-specs/collectives-westend.json
1 change: 1 addition & 0 deletions polkadot-parachain/chain-specs/contracts-rococo.json
1 change: 1 addition & 0 deletions polkadot-parachain/chain-specs/tick.json
1 change: 1 addition & 0 deletions polkadot-parachain/chain-specs/track.json
1 change: 1 addition & 0 deletions polkadot-parachain/chain-specs/trick.json
10 changes: 5 additions & 5 deletions polkadot-parachain/src/chain_spec/bridge_hubs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl BridgeHubRuntimeType {
match self {
BridgeHubRuntimeType::Polkadot =>
Ok(Box::new(polkadot::BridgeHubChainSpec::from_json_bytes(
&include_bytes!("../../../parachains/chain-specs/bridge-hub-polkadot.json")[..],
&include_bytes!("../../chain-specs/bridge-hub-polkadot.json")[..],
)?)),
BridgeHubRuntimeType::PolkadotLocal => Ok(Box::new(polkadot::local_config(
polkadot::BRIDGE_HUB_POLKADOT_LOCAL,
Expand All @@ -113,7 +113,7 @@ impl BridgeHubRuntimeType {
))),
BridgeHubRuntimeType::Kusama =>
Ok(Box::new(kusama::BridgeHubChainSpec::from_json_bytes(
&include_bytes!("../../../parachains/chain-specs/bridge-hub-kusama.json")[..],
&include_bytes!("../../chain-specs/bridge-hub-kusama.json")[..],
)?)),
BridgeHubRuntimeType::KusamaLocal => Ok(Box::new(kusama::local_config(
kusama::BRIDGE_HUB_KUSAMA_LOCAL,
Expand All @@ -129,11 +129,11 @@ impl BridgeHubRuntimeType {
))),
BridgeHubRuntimeType::Westend =>
Ok(Box::new(westend::BridgeHubChainSpec::from_json_bytes(
&include_bytes!("../../../parachains/chain-specs/bridge-hub-westend.json")[..],
&include_bytes!("../../chain-specs/bridge-hub-westend.json")[..],
)?)),
BridgeHubRuntimeType::Rococo =>
Ok(Box::new(rococo::BridgeHubChainSpec::from_json_bytes(
&include_bytes!("../../../parachains/chain-specs/bridge-hub-rococo.json")[..],
&include_bytes!("../../chain-specs/bridge-hub-rococo.json")[..],
)?)),
BridgeHubRuntimeType::RococoLocal => Ok(Box::new(rococo::local_config(
rococo::BRIDGE_HUB_ROCOCO_LOCAL,
Expand All @@ -153,7 +153,7 @@ impl BridgeHubRuntimeType {
))),
BridgeHubRuntimeType::Wococo =>
Ok(Box::new(wococo::BridgeHubChainSpec::from_json_bytes(
&include_bytes!("../../../parachains/chain-specs/bridge-hub-wococo.json")[..],
&include_bytes!("../../chain-specs/bridge-hub-wococo.json")[..],
)?)),
BridgeHubRuntimeType::WococoLocal => Ok(Box::new(wococo::local_config(
wococo::BRIDGE_HUB_WOCOCO_LOCAL,
Expand Down
18 changes: 9 additions & 9 deletions polkadot-parachain/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ fn load_spec(id: &str) -> std::result::Result<Box<dyn ChainSpec>, String> {
Box::new(chain_spec::rococo_parachain::staging_rococo_parachain_local_config()),
"tick" =>
Box::new(chain_spec::rococo_parachain::RococoParachainChainSpec::from_json_bytes(
&include_bytes!("../../parachains/chain-specs/tick.json")[..],
&include_bytes!("../chain-specs/tick.json")[..],
)?),
"trick" =>
Box::new(chain_spec::rococo_parachain::RococoParachainChainSpec::from_json_bytes(
&include_bytes!("../../parachains/chain-specs/trick.json")[..],
&include_bytes!("../chain-specs/trick.json")[..],
)?),
"track" =>
Box::new(chain_spec::rococo_parachain::RococoParachainChainSpec::from_json_bytes(
&include_bytes!("../../parachains/chain-specs/track.json")[..],
&include_bytes!("../chain-specs/track.json")[..],
)?),

// -- Starters
Expand All @@ -147,7 +147,7 @@ fn load_spec(id: &str) -> std::result::Result<Box<dyn ChainSpec>, String> {
// the shell-based chain spec as used for syncing
"asset-hub-polkadot" | "statemint" =>
Box::new(chain_spec::asset_hubs::AssetHubPolkadotChainSpec::from_json_bytes(
&include_bytes!("../../parachains/chain-specs/asset-hub-polkadot.json")[..],
&include_bytes!("../chain-specs/asset-hub-polkadot.json")[..],
)?),

// -- Asset Hub Kusama
Expand All @@ -161,7 +161,7 @@ fn load_spec(id: &str) -> std::result::Result<Box<dyn ChainSpec>, String> {
// the shell-based chain spec as used for syncing
"asset-hub-kusama" | "statemine" =>
Box::new(chain_spec::asset_hubs::AssetHubKusamaChainSpec::from_json_bytes(
&include_bytes!("../../parachains/chain-specs/asset-hub-kusama.json")[..],
&include_bytes!("../chain-specs/asset-hub-kusama.json")[..],
)?),

// -- Asset Hub Westend
Expand All @@ -175,7 +175,7 @@ fn load_spec(id: &str) -> std::result::Result<Box<dyn ChainSpec>, String> {
// the shell-based chain spec as used for syncing
"asset-hub-westend" | "westmint" =>
Box::new(chain_spec::asset_hubs::AssetHubWestendChainSpec::from_json_bytes(
&include_bytes!("../../parachains/chain-specs/asset-hub-westend.json")[..],
&include_bytes!("../chain-specs/asset-hub-westend.json")[..],
)?),

// -- Polkadot Collectives
Expand All @@ -185,11 +185,11 @@ fn load_spec(id: &str) -> std::result::Result<Box<dyn ChainSpec>, String> {
Box::new(chain_spec::collectives::collectives_polkadot_local_config()),
"collectives-polkadot" =>
Box::new(chain_spec::collectives::CollectivesPolkadotChainSpec::from_json_bytes(
&include_bytes!("../../parachains/chain-specs/collectives-polkadot.json")[..],
&include_bytes!("../chain-specs/collectives-polkadot.json")[..],
)?),
"collectives-westend" =>
Box::new(chain_spec::collectives::CollectivesPolkadotChainSpec::from_json_bytes(
&include_bytes!("../../parachains/chain-specs/collectives-westend.json")[..],
&include_bytes!("../chain-specs/collectives-westend.json")[..],
)?),

// -- Contracts on Rococo
Expand All @@ -200,7 +200,7 @@ fn load_spec(id: &str) -> std::result::Result<Box<dyn ChainSpec>, String> {
"contracts-rococo-genesis" => Box::new(chain_spec::contracts::contracts_rococo_config()),
"contracts-rococo" =>
Box::new(chain_spec::contracts::ContractsRococoChainSpec::from_json_bytes(
&include_bytes!("../../parachains/chain-specs/contracts-rococo.json")[..],
&include_bytes!("../chain-specs/contracts-rococo.json")[..],
)?),

// -- BridgeHub
Expand Down