Add support for Energy Web Foundation's new chains (#10957)

* add(chain-support): new ewf chains support added

- volta test network
- ewc production chain

* remove(tobalaba): ewf chain tobalaba support removal

- tobalaba is deprecated so not officially supported by ewf any more
This commit is contained in:
Adam Z. Nagy 2019-08-12 13:20:12 +02:00 committed by joshua-mir
parent cafdfa8107
commit ffc066e5a4
6 changed files with 426 additions and 88 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -76,7 +76,8 @@ bundle_release_spec! {
"ethereum/poasokol" => new_sokol, "ethereum/poasokol" => new_sokol,
"ethereum/rinkeby" => new_rinkeby, "ethereum/rinkeby" => new_rinkeby,
"ethereum/ropsten" => new_ropsten, "ethereum/ropsten" => new_ropsten,
"ethereum/tobalaba" => new_tobalaba "ethereum/volta" => new_volta,
"ethereum/ewc" => new_ewc
} }
bundle_test_spec! { bundle_test_spec! {

View File

@ -300,7 +300,7 @@ usage! {
ARG arg_chain: (String) = "foundation", or |c: &Config| c.parity.as_ref()?.chain.clone(), ARG arg_chain: (String) = "foundation", or |c: &Config| c.parity.as_ref()?.chain.clone(),
"--chain=[CHAIN]", "--chain=[CHAIN]",
"Specify the blockchain type. CHAIN may be either a JSON chain specification file or ethereum, classic, poacore, tobalaba, expanse, musicoin, ellaism, mix, callisto, morden, ropsten, kovan, rinkeby, goerli, kotti, poasokol, testnet, or dev.", "Specify the blockchain type. CHAIN may be either a JSON chain specification file or ethereum, classic, poacore, volta, ewc, expanse, musicoin, ellaism, mix, callisto, morden, ropsten, kovan, rinkeby, goerli, kotti, poasokol, testnet, or dev.",
ARG arg_keys_path: (String) = "$BASE/keys", or |c: &Config| c.parity.as_ref()?.keys_path.clone(), ARG arg_keys_path: (String) = "$BASE/keys", or |c: &Config| c.parity.as_ref()?.keys_path.clone(),
"--keys-path=[PATH]", "--keys-path=[PATH]",

View File

@ -34,7 +34,8 @@ pub enum SpecType {
Foundation, Foundation,
Classic, Classic,
Poanet, Poanet,
Tobalaba, Volta,
Ewc,
Expanse, Expanse,
Musicoin, Musicoin,
Ellaism, Ellaism,
@ -65,7 +66,8 @@ impl str::FromStr for SpecType {
"ethereum" | "frontier" | "homestead" | "byzantium" | "foundation" | "mainnet" => SpecType::Foundation, "ethereum" | "frontier" | "homestead" | "byzantium" | "foundation" | "mainnet" => SpecType::Foundation,
"classic" | "frontier-dogmatic" | "homestead-dogmatic" => SpecType::Classic, "classic" | "frontier-dogmatic" | "homestead-dogmatic" => SpecType::Classic,
"poanet" | "poacore" => SpecType::Poanet, "poanet" | "poacore" => SpecType::Poanet,
"tobalaba" => SpecType::Tobalaba, "volta" => SpecType::Volta,
"ewc" | "energyweb" => SpecType::Ewc,
"expanse" => SpecType::Expanse, "expanse" => SpecType::Expanse,
"musicoin" => SpecType::Musicoin, "musicoin" => SpecType::Musicoin,
"ellaism" => SpecType::Ellaism, "ellaism" => SpecType::Ellaism,
@ -91,7 +93,8 @@ impl fmt::Display for SpecType {
SpecType::Foundation => "foundation", SpecType::Foundation => "foundation",
SpecType::Classic => "classic", SpecType::Classic => "classic",
SpecType::Poanet => "poanet", SpecType::Poanet => "poanet",
SpecType::Tobalaba => "tobalaba", SpecType::Volta => "volta",
SpecType::Ewc => "energyweb",
SpecType::Expanse => "expanse", SpecType::Expanse => "expanse",
SpecType::Musicoin => "musicoin", SpecType::Musicoin => "musicoin",
SpecType::Ellaism => "ellaism", SpecType::Ellaism => "ellaism",
@ -117,7 +120,8 @@ impl SpecType {
SpecType::Foundation => Ok(spec::new_foundation(params)), SpecType::Foundation => Ok(spec::new_foundation(params)),
SpecType::Classic => Ok(spec::new_classic(params)), SpecType::Classic => Ok(spec::new_classic(params)),
SpecType::Poanet => Ok(spec::new_poanet(params)), SpecType::Poanet => Ok(spec::new_poanet(params)),
SpecType::Tobalaba => Ok(spec::new_tobalaba(params)), SpecType::Volta => Ok(spec::new_volta(params)),
SpecType::Ewc => Ok(spec::new_ewc(params)),
SpecType::Expanse => Ok(spec::new_expanse(params)), SpecType::Expanse => Ok(spec::new_expanse(params)),
SpecType::Musicoin => Ok(spec::new_musicoin(params)), SpecType::Musicoin => Ok(spec::new_musicoin(params)),
SpecType::Ellaism => Ok(spec::new_ellaism(params)), SpecType::Ellaism => Ok(spec::new_ellaism(params)),
@ -372,7 +376,9 @@ mod tests {
assert_eq!(SpecType::Classic, "homestead-dogmatic".parse().unwrap()); assert_eq!(SpecType::Classic, "homestead-dogmatic".parse().unwrap());
assert_eq!(SpecType::Poanet, "poanet".parse().unwrap()); assert_eq!(SpecType::Poanet, "poanet".parse().unwrap());
assert_eq!(SpecType::Poanet, "poacore".parse().unwrap()); assert_eq!(SpecType::Poanet, "poacore".parse().unwrap());
assert_eq!(SpecType::Tobalaba, "tobalaba".parse().unwrap()); assert_eq!(SpecType::Volta, "volta".parse().unwrap());
assert_eq!(SpecType::Ewc, "ewc".parse().unwrap());
assert_eq!(SpecType::Ewc, "energyweb".parse().unwrap());
assert_eq!(SpecType::Expanse, "expanse".parse().unwrap()); assert_eq!(SpecType::Expanse, "expanse".parse().unwrap());
assert_eq!(SpecType::Musicoin, "musicoin".parse().unwrap()); assert_eq!(SpecType::Musicoin, "musicoin".parse().unwrap());
assert_eq!(SpecType::Ellaism, "ellaism".parse().unwrap()); assert_eq!(SpecType::Ellaism, "ellaism".parse().unwrap());
@ -401,7 +407,8 @@ mod tests {
assert_eq!(format!("{}", SpecType::Foundation), "foundation"); assert_eq!(format!("{}", SpecType::Foundation), "foundation");
assert_eq!(format!("{}", SpecType::Classic), "classic"); assert_eq!(format!("{}", SpecType::Classic), "classic");
assert_eq!(format!("{}", SpecType::Poanet), "poanet"); assert_eq!(format!("{}", SpecType::Poanet), "poanet");
assert_eq!(format!("{}", SpecType::Tobalaba), "tobalaba"); assert_eq!(format!("{}", SpecType::Volta), "volta");
assert_eq!(format!("{}", SpecType::Ewc), "energyweb");
assert_eq!(format!("{}", SpecType::Expanse), "expanse"); assert_eq!(format!("{}", SpecType::Expanse), "expanse");
assert_eq!(format!("{}", SpecType::Musicoin), "musicoin"); assert_eq!(format!("{}", SpecType::Musicoin), "musicoin");
assert_eq!(format!("{}", SpecType::Ellaism), "ellaism"); assert_eq!(format!("{}", SpecType::Ellaism), "ellaism");