Skip to content

Commit

Permalink
Merge pull request #41 from paseo-network/fixed-chain-spec
Browse files Browse the repository at this point in the history
Add new chain specs.
  • Loading branch information
al3mart authored Feb 20, 2024
2 parents 8527ce1 + 5f5917b commit 9aa1fa3
Show file tree
Hide file tree
Showing 9 changed files with 1,441 additions and 11,667 deletions.
3,046 changes: 703 additions & 2,343 deletions chain-spec-generator/Cargo.lock

Large diffs are not rendered by default.

36 changes: 16 additions & 20 deletions chain-spec-generator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,26 @@ hex-literal = "0.4.1"
serde_json = "1.0.107"
serde = { version = "1.0.188", features = ["derive"] }

sc-chain-spec = "22.0.0"
sc-consensus-grandpa = "0.14.0"
sp-consensus-babe = "0.27.0"
sp-authority-discovery = "21.0.0"
sp-core = "23.0.0"
sp-runtime = "26.0.0"
sp-consensus-beefy = "8.0.0"

pallet-staking = "23.0.0"
pallet-im-online = "22.0.0"

polkadot-runtime-parachains = "2.0.0"
polkadot-primitives = "2.0.0"
parachains-common = { version = "2.0.0" }
cumulus-primitives-core = { version = "0.2.0" }

xcm = { package = "staging-xcm", version = "2.0.1" }
sc-chain-spec = "24.0.0"
polkadot-runtime-parachains = "4.0.0"
polkadot-primitives = "4.0.0"
sp-consensus-babe = "0.29.0"
sp-authority-discovery = "23.0.0"
sp-core = "25.0.0"
pallet-staking = "25.0.0"
sc-consensus-grandpa = "0.16.0"
pallet-im-online = "24.0.0"
sp-runtime = "28.0.0"
sp-consensus-beefy = "10.0.0"
xcm = { package = "staging-xcm", version = "4.0.0" }
parachains-common = { version = "4.0.0" }
cumulus-primitives-core = { version = "0.4.0" }

paseo-runtime = { path = "../relay/paseo" }
paseo-runtime-constants = { path = "../relay/paseo/constants" }
asset-hub-paseo-runtime = { path = "../system-parachains/asset-hub-paseo" }


[features]
runtime-benchmarks = [
"asset-hub-paseo-runtime/runtime-benchmarks",
"paseo-runtime/runtime-benchmarks",
]
]
5 changes: 1 addition & 4 deletions chain-spec-generator/src/common.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{
relay_chain_specs::PaseoChainSpec, system_parachains_specs::AssetHubPaseoChainSpec, ChainSpec,
relay_chain_specs::PaseoChainSpec, ChainSpec,
};
use polkadot_primitives::{AccountId, AccountPublic};
use sp_core::{sr25519, Pair, Public};
Expand Down Expand Up @@ -52,9 +52,6 @@ pub fn from_json_file(filepath: &str, supported: String) -> Result<Box<dyn Chain
x if x.starts_with("paseo") | x.starts_with("pas") => {
Ok(Box::new(PaseoChainSpec::from_json_file(path)?))
}
x if x.starts_with("asset-hub-paseo") => {
Ok(Box::new(AssetHubPaseoChainSpec::from_json_file(path)?))
}
_ => Err(format!(
"Unknown chain 'id' in json file. Only supported: {supported}'"
)),
Expand Down
13 changes: 1 addition & 12 deletions chain-spec-generator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use std::collections::HashMap;

mod common;
mod relay_chain_specs;
mod system_parachains_specs;

#[derive(Parser)]
struct Cli {
Expand All @@ -28,17 +27,7 @@ fn main() -> Result<(), String> {
(
"paseo-local",
Box::new(|| relay_chain_specs::paseo_local_config()) as Box<_>,
),
(
"asset-hub-paseo",
Box::new(|| system_parachains_specs::asset_hub_polkadot_local_testnet_config())
as Box<_>,
),
(
"asset-hub-paseo-local",
Box::new(|| system_parachains_specs::asset_hub_kusama_local_testnet_config())
as Box<_>,
),
)
]);

if let Some(function) = supported_chains.get(&*cli.chain) {
Expand Down
304 changes: 216 additions & 88 deletions chain-spec-generator/src/relay_chain_specs.rs

Large diffs are not rendered by default.

254 changes: 0 additions & 254 deletions chain-spec-generator/src/system_parachains_specs.rs

This file was deleted.

313 changes: 273 additions & 40 deletions chain-specs/paseo.plain.json

Large diffs are not rendered by default.

Loading

0 comments on commit 9aa1fa3

Please sign in to comment.