Skip to content

Commit

Permalink
Merge pull request #103 from galacticcouncil/fix/chainspec_parachain_id
Browse files Browse the repository at this point in the history
fix: parachain id for kusama
  • Loading branch information
mrq1911 committed Aug 29, 2021
2 parents 81c3453 + 3af8cd2 commit b13df01
Show file tree
Hide file tree
Showing 3 changed files with 140 additions and 86 deletions.
212 changes: 132 additions & 80 deletions node/res/basilisk.json

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions node/src/chain_spec.rs
Expand Up @@ -25,6 +25,8 @@ const TELEMETRY_URLS: [&str; 2] = [
"wss://telemetry.polkadot.io/submit/",
"wss://telemetry.hydradx.io:9000/submit/",
];
//Kusama parachain id
const PARA_ID: u32 = 2090;

/// The extensions for the [`ChainSpec`].
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension)]
Expand Down Expand Up @@ -86,7 +88,7 @@ pub fn basilisk_parachain_config() -> Result<ChainSpec, String> {
ChainSpec::from_json_bytes(&include_bytes!("../res/basilisk.json")[..])
}

pub fn kusama_staging_parachain_config(para_id: ParaId) -> Result<ChainSpec, String> {
pub fn kusama_staging_parachain_config() -> Result<ChainSpec, String> {
let wasm_binary = WASM_BINARY.ok_or("Development wasm binary not available".to_string())?;
let mut properties = Map::new();
properties.insert("tokenDecimals".into(), TOKEN_DECIMALS.into());
Expand Down Expand Up @@ -129,7 +131,7 @@ pub fn kusama_staging_parachain_config(para_id: ParaId) -> Result<ChainSpec, Str
// Pre-funded accounts
vec![],
true,
para_id,
PARA_ID.into(),
//technical committee
hex!["6d6f646c70792f74727372790000000000000000000000000000000000000000"].into(), // TREASURY - Fallback for multi tx payment
)
Expand Down Expand Up @@ -161,7 +163,7 @@ pub fn kusama_staging_parachain_config(para_id: ParaId) -> Result<ChainSpec, Str
// Extensions
Extensions {
relay_chain: "kusama".into(),
para_id: para_id.into(),
para_id: PARA_ID,
},
))
}
Expand Down Expand Up @@ -549,7 +551,7 @@ fn parachain_genesis(
tokens: Default::default(),
},
vesting: VestingConfig { vesting: vec![] },
parachain_info: ParachainInfoConfig { parachain_id }, //TODO
parachain_info: ParachainInfoConfig { parachain_id },
aura_ext: Default::default(),
duster: DusterConfig {
account_blacklist: vec![hex!["6d6f646c70792f74727372790000000000000000000000000000000000000000"].into()],
Expand Down
4 changes: 2 additions & 2 deletions node/src/command.rs
Expand Up @@ -42,7 +42,7 @@ fn load_spec(id: &str, para_id: ParaId) -> std::result::Result<Box<dyn sc_servic
"benchmarks" => Box::new(chain_spec::benchmarks_development_config(para_id)?),
"testnet" => Box::new(chain_spec::testnet_parachain_config(para_id)?),
"local" => Box::new(chain_spec::local_parachain_config(para_id)?),
"staging" => Box::new(chain_spec::kusama_staging_parachain_config(para_id)?),
"staging" => Box::new(chain_spec::kusama_staging_parachain_config()?),
path => Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(path))?),
})
}
Expand Down Expand Up @@ -80,7 +80,7 @@ impl SubstrateCli for Cli {
"benchmarks" => Box::new(chain_spec::benchmarks_development_config(para_id)?),
"testnet" => Box::new(chain_spec::testnet_parachain_config(para_id)?),
"local" => Box::new(chain_spec::local_parachain_config(para_id)?),
"staging" => Box::new(chain_spec::kusama_staging_parachain_config(para_id)?),
"staging" => Box::new(chain_spec::kusama_staging_parachain_config()?),
path => Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(path))?),
})
}
Expand Down

0 comments on commit b13df01

Please sign in to comment.