solochain_template_node/
chain_spec.rs1use sc_service::ChainType;
2use solochain_template_runtime::WASM_BINARY;
3
4pub type ChainSpec = sc_service::GenericChainSpec;
6
7pub fn development_chain_spec() -> Result<ChainSpec, String> {
8 Ok(ChainSpec::builder(
9 WASM_BINARY.ok_or_else(|| "Development wasm not available".to_string())?,
10 None,
11 )
12 .with_name("Development")
13 .with_id("dev")
14 .with_chain_type(ChainType::Development)
15 .with_genesis_config_preset_name(sp_genesis_builder::DEV_RUNTIME_PRESET)
16 .build())
17}
18
19pub fn local_chain_spec() -> Result<ChainSpec, String> {
20 Ok(ChainSpec::builder(
21 WASM_BINARY.ok_or_else(|| "Development wasm not available".to_string())?,
22 None,
23 )
24 .with_name("Local Testnet")
25 .with_id("local_testnet")
26 .with_chain_type(ChainType::Local)
27 .with_genesis_config_preset_name(sp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET)
28 .build())
29}