frequency_service/chain_spec/
frequency.rs

1#![allow(missing_docs)]
2use super::Extensions;
3
4/// Specialized `ChainSpec` for the normal parachain runtime.
5pub type ChainSpec = sc_service::GenericChainSpec<Extensions>;
6
7#[allow(clippy::unwrap_used)]
8pub fn load_frequency_spec() -> ChainSpec {
9	ChainSpec::from_json_bytes(&include_bytes!("../../../../resources/frequency.raw.json")[..])
10		.unwrap()
11}
12
13#[cfg(feature = "runtime-benchmarks")]
14#[allow(clippy::unwrap_used)]
15pub fn benchmark_mainnet_config() -> ChainSpec {
16	use super::get_properties;
17	use common_runtime::constants::{Ss58Prefix, FREQUENCY_TOKEN, TOKEN_DECIMALS};
18	use cumulus_primitives_core::ParaId;
19	use sc_service::ChainType;
20	use sc_telemetry::TelemetryEndpoints;
21
22	let properties =
23		get_properties(FREQUENCY_TOKEN, TOKEN_DECIMALS as u32, Ss58Prefix::get().into());
24	let para_id: ParaId = 2091.into();
25	ChainSpec::builder(
26		frequency_runtime::wasm_binary_unwrap(),
27		Extensions { relay_chain: "polkadot".into(), para_id: para_id.into() },
28	).with_name(
29		"Frequency",
30	).with_protocol_id(
31		"frequency",
32	).with_properties(
33		properties,
34	).with_chain_type(
35		ChainType::Live
36	).with_telemetry_endpoints(
37		TelemetryEndpoints::new(vec![("wss://telemetry.polkadot.io/submit/".into(), 0), ("wss://telemetry.frequency.xyz/submit/".into(), 0)]).unwrap()
38	).with_boot_nodes(vec![
39		"/dns4/0.boot.frequency.xyz/tcp/30333/ws/p2p/12D3KooWBd4aEArNvXECtt2JHQACBdFmeafpyfre3q81iM1xCcpP".parse().unwrap(),
40		"/dns4/1.boot.frequency.xyz/tcp/30333/ws/p2p/12D3KooWCW8d7Yz2d3Jcb49rWcNppRNEs1K2NZitCpPtrHSQb6dw".parse().unwrap(),
41	])
42	.with_genesis_config_preset_name("frequency")
43	.build()
44}