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,
|
LocalTestnet,
|
||||||
/// The Kusama network.
|
/// The Kusama network.
|
||||||
Kusama,
|
Kusama,
|
||||||
|
/// The Westend network,
|
||||||
|
Westend,
|
||||||
/// Whatever the current runtime is with the "global testnet" defaults.
|
/// Whatever the current runtime is with the "global testnet" defaults.
|
||||||
StagingTestnet,
|
StagingTestnet,
|
||||||
}
|
}
|
||||||
@@ -45,6 +47,7 @@ impl ChainSpec {
|
|||||||
ChainSpec::Development => Ok(service::chain_spec::development_config()),
|
ChainSpec::Development => Ok(service::chain_spec::development_config()),
|
||||||
ChainSpec::LocalTestnet => Ok(service::chain_spec::local_testnet_config()),
|
ChainSpec::LocalTestnet => Ok(service::chain_spec::local_testnet_config()),
|
||||||
ChainSpec::StagingTestnet => Ok(service::chain_spec::staging_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(),
|
ChainSpec::Kusama => service::chain_spec::kusama_config(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -54,6 +57,7 @@ impl ChainSpec {
|
|||||||
"dev" => Some(ChainSpec::Development),
|
"dev" => Some(ChainSpec::Development),
|
||||||
"local" => Some(ChainSpec::LocalTestnet),
|
"local" => Some(ChainSpec::LocalTestnet),
|
||||||
"kusama" => Some(ChainSpec::Kusama),
|
"kusama" => Some(ChainSpec::Kusama),
|
||||||
|
"westend" => Some(ChainSpec::Westend),
|
||||||
"staging" => Some(ChainSpec::StagingTestnet),
|
"staging" => Some(ChainSpec::StagingTestnet),
|
||||||
"" => Some(ChainSpec::default()),
|
"" => Some(ChainSpec::default()),
|
||||||
_ => None,
|
_ => 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")[..])
|
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(
|
fn session_keys(
|
||||||
babe: BabeId,
|
babe: BabeId,
|
||||||
grandpa: GrandpaId,
|
grandpa: GrandpaId,
|
||||||
|
|||||||
Reference in New Issue
Block a user