mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 12:51:02 +00:00
Add spec for westend network (#792)
* add json * Add spec changes * Fix config method * spaces -> tabs
This commit is contained in:
@@ -28,6 +28,8 @@ pub enum ChainSpec {
|
||||
LocalTestnet,
|
||||
/// The Kusama network.
|
||||
Kusama,
|
||||
/// The Westend network,
|
||||
Westend,
|
||||
/// Whatever the current runtime is with the "global testnet" defaults.
|
||||
StagingTestnet,
|
||||
}
|
||||
@@ -45,6 +47,7 @@ impl ChainSpec {
|
||||
ChainSpec::Development => Ok(service::chain_spec::development_config()),
|
||||
ChainSpec::LocalTestnet => Ok(service::chain_spec::local_testnet_config()),
|
||||
ChainSpec::StagingTestnet => Ok(service::chain_spec::staging_testnet_config()),
|
||||
ChainSpec::Westend => service::chain_spec::westend_config(),
|
||||
ChainSpec::Kusama => service::chain_spec::kusama_config(),
|
||||
}
|
||||
}
|
||||
@@ -54,6 +57,7 @@ impl ChainSpec {
|
||||
"dev" => Some(ChainSpec::Development),
|
||||
"local" => Some(ChainSpec::LocalTestnet),
|
||||
"kusama" => Some(ChainSpec::Kusama),
|
||||
"westend" => Some(ChainSpec::Westend),
|
||||
"staging" => Some(ChainSpec::StagingTestnet),
|
||||
"" => Some(ChainSpec::default()),
|
||||
_ => None,
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -60,6 +60,10 @@ pub fn kusama_config() -> Result<ChainSpec, String> {
|
||||
ChainSpec::from_json_bytes(&include_bytes!("../res/kusama.json")[..])
|
||||
}
|
||||
|
||||
pub fn westend_config() -> Result<ChainSpec, String> {
|
||||
ChainSpec::from_json_bytes(&include_bytes!("../res/westend.json")[..])
|
||||
}
|
||||
|
||||
fn session_keys(
|
||||
babe: BabeId,
|
||||
grandpa: GrandpaId,
|
||||
|
||||
Reference in New Issue
Block a user