Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bkontur committed Feb 26, 2024
1 parent 88e2f24 commit 8ed52d8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions chain-spec-generator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ encointer-kusama-runtime = { path = "../system-parachains/encointer" }
glutton-kusama-runtime = { path = "../system-parachains/gluttons/glutton-kusama" }

# Encointer is(could be) not migrated to the latest release, so we use compatible deps, when needed
# (if so, then just set this version according to the actual encointer)
# sp-core-encointer-compatible = { package = "sp-core", version = "28.0.0" }
# (if so, uncomment and set this version according to the actual encointer + check `fn encointer_kusama_genesis`)
# sp-core-encointer-compatible = { package = "sp-core", version = "29.0.0" }

[features]
fast-runtime = [
Expand Down
22 changes: 12 additions & 10 deletions chain-spec-generator/src/system_parachains_specs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,15 +518,17 @@ pub fn glutton_kusama_local_testnet_config() -> Result<Box<dyn ChainSpec>, Strin

// EncointerKusama
fn encointer_kusama_genesis(endowed_accounts: Vec<AccountId>, id: u32) -> serde_json::Value {
// The Encointer may not be migrated to the latest release, so we use compatible dependencies.
fn get_from_seed<TPublic: sp_core_encointer_compatible::Public>(
seed: &str,
) -> <TPublic::Pair as sp_core_encointer_compatible::Pair>::Public {
use sp_core_encointer_compatible::Pair;
TPublic::Pair::from_string(&format!("//{}", seed), None)
.expect("static values are valid; qed")
.public()
}
// The Encointer is(could be) not be migrated to the latest release, so we use compatible
// dependencies. (if so, uncomment this and set version for `sp_core_encointer_compatible`
// according to the actual encointer in Cargo.toml`) use sp_core_encointer_compatible as
// sp_core; fn get_from_seed<TPublic: sp_core_encointer_compatible::Public>(
// seed: &str,
// ) -> <TPublic::Pair as sp_core_encointer_compatible::Pair>::Public {
// use sp_core_encointer_compatible::Pair;
// TPublic::Pair::from_string(&format!("//{}", seed), None)
// .expect("static values are valid; qed")
// .public()
// }

serde_json::json!({
"balances": asset_hub_kusama_runtime::BalancesConfig {
Expand All @@ -544,7 +546,7 @@ fn encointer_kusama_genesis(endowed_accounts: Vec<AccountId>, id: u32) -> serde_
"safeXcmVersion": Some(SAFE_XCM_VERSION),
},
"aura": encointer_kusama_runtime::AuraConfig {
authorities: vec![get_from_seed::<sp_core_encointer_compatible::sr25519::Public>("Alice").into()],
authorities: vec![get_from_seed::<sp_core::sr25519::Public>("Alice").into()],
},
})
}
Expand Down

0 comments on commit 8ed52d8

Please sign in to comment.