Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: parachain id for kusama #103

Merged
merged 5 commits into from Aug 29, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
128 changes: 64 additions & 64 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 = 2082;

/// 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 @@ -477,7 +479,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(),
}
}
Expand Down
4 changes: 2 additions & 2 deletions node/src/command.rs
Expand Up @@ -41,7 +41,7 @@ fn load_spec(id: &str, para_id: ParaId) -> std::result::Result<Box<dyn sc_servic
"dev" => Box::new(chain_spec::parachain_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 @@ -78,7 +78,7 @@ impl SubstrateCli for Cli {
"dev" => Box::new(chain_spec::parachain_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