use sp_core::storage::Storage;
use cumulus_primitives_core::ParaId;
use emulated_integration_tests_common::{
accounts, build_genesis_storage, collators, SAFE_XCM_VERSION,
};
use parachains_common::Balance;
pub const PARA_ID: u32 = 1004;
pub const ED: Balance = testnet_parachains_constants::rococo::currency::EXISTENTIAL_DEPOSIT;
pub fn genesis() -> Storage {
let genesis_config = people_rococo_runtime::RuntimeGenesisConfig {
system: people_rococo_runtime::SystemConfig::default(),
balances: people_rococo_runtime::BalancesConfig {
balances: accounts::init_balances().iter().cloned().map(|k| (k, ED * 4096)).collect(),
},
parachain_info: people_rococo_runtime::ParachainInfoConfig {
parachain_id: ParaId::from(PARA_ID),
..Default::default()
},
collator_selection: people_rococo_runtime::CollatorSelectionConfig {
invulnerables: collators::invulnerables().iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: ED * 16,
..Default::default()
},
session: people_rococo_runtime::SessionConfig {
keys: collators::invulnerables()
.into_iter()
.map(|(acc, aura)| {
(
acc.clone(), acc, people_rococo_runtime::SessionKeys { aura }, )
})
.collect(),
..Default::default()
},
polkadot_xcm: people_rococo_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
},
..Default::default()
};
build_genesis_storage(
&genesis_config,
people_rococo_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"),
)
}