coretime_westend_emulated_chain/
genesis.rs1use sp_core::storage::Storage;
18
19use emulated_integration_tests_common::{
21 accounts, build_genesis_storage, collators, SAFE_XCM_VERSION,
22};
23use parachains_common::Balance;
24
25pub const PARA_ID: u32 = 1005;
26pub const ED: Balance = testnet_parachains_constants::westend::currency::EXISTENTIAL_DEPOSIT;
27
28pub fn genesis() -> Storage {
29 let genesis_config = coretime_westend_runtime::RuntimeGenesisConfig {
30 system: coretime_westend_runtime::SystemConfig::default(),
31 balances: coretime_westend_runtime::BalancesConfig {
32 balances: accounts::init_balances().iter().cloned().map(|k| (k, ED * 4096)).collect(),
33 ..Default::default()
34 },
35 parachain_info: coretime_westend_runtime::ParachainInfoConfig {
36 parachain_id: PARA_ID.into(),
37 ..Default::default()
38 },
39 collator_selection: coretime_westend_runtime::CollatorSelectionConfig {
40 invulnerables: collators::invulnerables().iter().cloned().map(|(acc, _)| acc).collect(),
41 candidacy_bond: ED * 16,
42 ..Default::default()
43 },
44 session: coretime_westend_runtime::SessionConfig {
45 keys: collators::invulnerables()
46 .into_iter()
47 .map(|(acc, aura)| {
48 (
49 acc.clone(), acc, coretime_westend_runtime::SessionKeys { aura }, )
53 })
54 .collect(),
55 ..Default::default()
56 },
57 polkadot_xcm: coretime_westend_runtime::PolkadotXcmConfig {
58 safe_xcm_version: Some(SAFE_XCM_VERSION),
59 ..Default::default()
60 },
61 ..Default::default()
62 };
63
64 build_genesis_storage(
65 &genesis_config,
66 coretime_westend_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"),
67 )
68}