Commit f2f4217e authored by Sebastian Dechant's avatar Sebastian Dechant Committed by Andronik Ordian

add support for evan.network chains (#11289)

* add support for evan.network chains

* fix chainspec parsing errror

* add missing core param

* missing colon
parent 4c3be46f
Pipeline #70867 passed with stages
in 28 minutes and 24 seconds
This diff is collapsed.
This diff is collapsed.
......@@ -62,6 +62,8 @@ bundle_release_spec! {
"ethereum/callisto" => new_callisto,
"ethereum/classic" => new_classic,
"ethereum/ellaism" => new_ellaism,
"ethereum/evantestcore" => new_evantestcore,
"ethereum/evancore" => new_evancore,
"ethereum/expanse" => new_expanse,
"ethereum/foundation" => new_foundation,
"ethereum/goerli" => new_goerli,
......
......@@ -300,7 +300,7 @@ usage! {
ARG arg_chain: (String) = "foundation", or |c: &Config| c.parity.as_ref()?.chain.clone(),
"--chain=[CHAIN]",
"Specify the blockchain type. CHAIN may be either a JSON chain specification file or ethereum, classic, poacore, xdai, volta, ewc, musicoin, ellaism, mix, callisto, morden, mordor, 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, xdai, volta, ewc, musicoin, ellaism, mix, callisto, morden, mordor, ropsten, kovan, rinkeby, goerli, kotti, poasokol, testnet, evantestcore, evancore or dev.",
ARG arg_keys_path: (String) = "$BASE/keys", or |c: &Config| c.parity.as_ref()?.keys_path.clone(),
"--keys-path=[PATH]",
......
......@@ -51,6 +51,8 @@ pub enum SpecType {
Goerli,
Kotti,
Sokol,
Evantestcore,
Evancore,
Dev,
Custom(String),
}
......@@ -84,6 +86,8 @@ impl str::FromStr for SpecType {
"goerli" | "görli" | "testnet" => SpecType::Goerli,
"kotti" => SpecType::Kotti,
"sokol" | "poasokol" => SpecType::Sokol,
"evantestcore" => SpecType::Evantestcore,
"evancore" => SpecType::Evancore,
"dev" => SpecType::Dev,
other => SpecType::Custom(other.into()),
};
......@@ -112,6 +116,8 @@ impl fmt::Display for SpecType {
SpecType::Goerli => "goerli",
SpecType::Kotti => "kotti",
SpecType::Sokol => "sokol",
SpecType::Evantestcore => "evantestcore",
SpecType::Evancore => "evancore",
SpecType::Dev => "dev",
SpecType::Custom(ref custom) => custom,
})
......@@ -140,6 +146,8 @@ impl SpecType {
SpecType::Goerli => Ok(spec::new_goerli(params)),
SpecType::Kotti => Ok(spec::new_kotti(params)),
SpecType::Sokol => Ok(spec::new_sokol(params)),
SpecType::Evantestcore => Ok(spec::new_evantestcore(params)),
SpecType::Evancore => Ok(spec::new_evancore(params)),
SpecType::Dev => Ok(spec::new_instant()),
SpecType::Custom(ref filename) => {
let file = fs::File::open(filename).map_err(|e| format!("Could not load specification file at {}: {}", filename, e))?;
......@@ -401,6 +409,8 @@ mod tests {
assert_eq!(SpecType::Kotti, "kotti".parse().unwrap());
assert_eq!(SpecType::Sokol, "sokol".parse().unwrap());
assert_eq!(SpecType::Sokol, "poasokol".parse().unwrap());
assert_eq!(SpecType::Evantestcore, "evantestcore".parse().unwrap());
assert_eq!(SpecType::Evancore, "evancore".parse().unwrap());
}
#[test]
......@@ -428,6 +438,8 @@ mod tests {
assert_eq!(format!("{}", SpecType::Goerli), "goerli");
assert_eq!(format!("{}", SpecType::Kotti), "kotti");
assert_eq!(format!("{}", SpecType::Sokol), "sokol");
assert_eq!(format!("{}", SpecType::Evantestcore), "evantestcore");
assert_eq!(format!("{}", SpecType::Evancore), "evancore");
assert_eq!(format!("{}", SpecType::Dev), "dev");
assert_eq!(format!("{}", SpecType::Custom("foo/bar".into())), "foo/bar");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment