Files
pezkuwi-subxt/polkadot-parachain/src/chain_spec/shell.rs
T
Squirrel ebfa19af31 Split chain_spec to individual chain families (#1347)
* Split chain_spec to individual chain families.

* cargo fmt

* Replace ifs with match

* Runtime::Generic variant avoiding Option
2022-06-17 14:47:21 +00:00

50 lines
1.6 KiB
Rust

// Copyright 2019-2021 Parity Technologies (UK) Ltd.
// This file is part of Cumulus.
// Cumulus is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Cumulus is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
use crate::chain_spec::Extensions;
use cumulus_primitives_core::ParaId;
use sc_service::ChainType;
/// Specialized `ChainSpec` for the shell parachain runtime.
pub type ShellChainSpec = sc_service::GenericChainSpec<shell_runtime::GenesisConfig, Extensions>;
pub fn get_shell_chain_spec() -> ShellChainSpec {
ShellChainSpec::from_genesis(
"Shell Local Testnet",
"shell_local_testnet",
ChainType::Local,
move || shell_testnet_genesis(1000.into()),
Vec::new(),
None,
None,
None,
None,
Extensions { relay_chain: "westend".into(), para_id: 1000 },
)
}
fn shell_testnet_genesis(parachain_id: ParaId) -> shell_runtime::GenesisConfig {
shell_runtime::GenesisConfig {
system: shell_runtime::SystemConfig {
code: shell_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
.to_vec(),
},
parachain_info: shell_runtime::ParachainInfoConfig { parachain_id },
parachain_system: Default::default(),
}
}