Add Ethereum Social support (#8325)

This commit is contained in:
Akira Takizawa 2018-04-09 23:18:00 +09:00 committed by Rando
parent e6f75bccfe
commit d97cf34138
4 changed files with 8867 additions and 1 deletions

File diff suppressed because it is too large Load Diff

View File

@ -76,6 +76,11 @@ pub fn new_easthub<'a, T: Into<SpecParams<'a>>>(params: T) -> Spec {
load(params.into(), include_bytes!("../../res/ethereum/easthub.json")) load(params.into(), include_bytes!("../../res/ethereum/easthub.json"))
} }
/// Create a new Ethereum Social mainnet chain spec ¯\_(ツ)_/¯ .
pub fn new_social<'a, T: Into<SpecParams<'a>>>(params: T) -> Spec {
load(params.into(), include_bytes!("../../res/ethereum/social.json"))
}
/// Create a new Kovan testnet chain spec. /// Create a new Kovan testnet chain spec.
pub fn new_kovan<'a, T: Into<SpecParams<'a>>>(params: T) -> Spec { pub fn new_kovan<'a, T: Into<SpecParams<'a>>>(params: T) -> Spec {
load(params.into(), include_bytes!("../../res/ethereum/kovan.json")) load(params.into(), include_bytes!("../../res/ethereum/kovan.json"))

View File

@ -294,7 +294,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 olympic, frontier, homestead, mainnet, morden, ropsten, classic, expanse, musicoin, ellaism, easthub, testnet, kovan or dev.", "Specify the blockchain type. CHAIN may be either a JSON chain specification file or olympic, frontier, homestead, mainnet, morden, ropsten, classic, expanse, musicoin, ellaism, easthub, social, testnet, kovan 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

@ -39,6 +39,7 @@ pub enum SpecType {
Musicoin, Musicoin,
Ellaism, Ellaism,
Easthub, Easthub,
Social,
Dev, Dev,
Custom(String), Custom(String),
} }
@ -64,6 +65,7 @@ impl str::FromStr for SpecType {
"musicoin" => SpecType::Musicoin, "musicoin" => SpecType::Musicoin,
"ellaism" => SpecType::Ellaism, "ellaism" => SpecType::Ellaism,
"easthub" => SpecType::Easthub, "easthub" => SpecType::Easthub,
"social" => SpecType::Social,
"dev" => SpecType::Dev, "dev" => SpecType::Dev,
other => SpecType::Custom(other.into()), other => SpecType::Custom(other.into()),
}; };
@ -83,6 +85,7 @@ impl fmt::Display for SpecType {
SpecType::Musicoin => "musicoin", SpecType::Musicoin => "musicoin",
SpecType::Ellaism => "ellaism", SpecType::Ellaism => "ellaism",
SpecType::Easthub => "easthub", SpecType::Easthub => "easthub",
SpecType::Social => "social",
SpecType::Kovan => "kovan", SpecType::Kovan => "kovan",
SpecType::Dev => "dev", SpecType::Dev => "dev",
SpecType::Custom(ref custom) => custom, SpecType::Custom(ref custom) => custom,
@ -103,6 +106,7 @@ impl SpecType {
SpecType::Musicoin => Ok(ethereum::new_musicoin(params)), SpecType::Musicoin => Ok(ethereum::new_musicoin(params)),
SpecType::Ellaism => Ok(ethereum::new_ellaism(params)), SpecType::Ellaism => Ok(ethereum::new_ellaism(params)),
SpecType::Easthub => Ok(ethereum::new_easthub(params)), SpecType::Easthub => Ok(ethereum::new_easthub(params)),
SpecType::Social => Ok(ethereum::new_social(params)),
SpecType::Kovan => Ok(ethereum::new_kovan(params)), SpecType::Kovan => Ok(ethereum::new_kovan(params)),
SpecType::Dev => Ok(Spec::new_instant()), SpecType::Dev => Ok(Spec::new_instant()),
SpecType::Custom(ref filename) => { SpecType::Custom(ref filename) => {