diff --git a/ethcore/src/ethereum/mod.rs b/ethcore/src/ethereum/mod.rs index d7acabc45e8..2ecef49412d 100644 --- a/ethcore/src/ethereum/mod.rs +++ b/ethcore/src/ethereum/mod.rs @@ -65,6 +65,11 @@ pub fn new_classic<'a, T: Into>>(params: T) -> Spec { load(params.into(), include_bytes!("../../res/ethereum/classic.json")) } +/// Create a new Expanse mainnet chain spec. +pub fn new_expanse<'a, T: Into>>(params: T) -> Spec { + load(params.into(), include_bytes!("../../res/ethereum/expanse.json")) +} + /// Create a new Musicoin mainnet chain spec. pub fn new_musicoin<'a, T: Into>>(params: T) -> Spec { load(params.into(), include_bytes!("../../res/ethereum/musicoin.json")) diff --git a/js-old/src/i18n/_default/settings.js b/js-old/src/i18n/_default/settings.js index 44e2a412479..ea447e4a99d 100644 --- a/js-old/src/i18n/_default/settings.js +++ b/js-old/src/i18n/_default/settings.js @@ -1,4 +1,4 @@ -// Copyright 2015-2018 Parity Technologies (UK) Ltd. +// Copyright 2015-2017 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -25,6 +25,7 @@ export default { chains: { chain_classic: `Parity syncs to the Ethereum Classic network`, chain_dev: `Parity uses a local development chain`, + chain_expanse: `Parity syncs to the Expanse network`, chain_foundation: `Parity syncs to the Ethereum network launched by the Ethereum Foundation`, chain_kovan: `Parity syncs to the Kovan test network`, chain_olympic: `Parity syncs to the Olympic test network`, diff --git a/js-old/src/i18n/nl/settings.js b/js-old/src/i18n/nl/settings.js index 41202819884..f436d39c652 100644 --- a/js-old/src/i18n/nl/settings.js +++ b/js-old/src/i18n/nl/settings.js @@ -1,4 +1,4 @@ -// Copyright 2015-2018 Parity Technologies (UK) Ltd. +// Copyright 2015-2017 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -25,6 +25,7 @@ export default { chains: { chain_classic: `Parity synchroniseert met het Ethereum Classic netwerk`, chain_dev: `Parity gebruikt een lokale ontwikkelaars chain`, + chain_expanse: `Parity synchroniseert met het Expanse netwerk`, chain_foundation: `Parity synchroniseert met het Ethereum netwerk wat door de Ethereum Foundation is uitgebracht`, chain_kovan: `Parity synchroniseert met het Kovan test netwerk`, chain_olympic: `Parity synchroniseert met het Olympic test netwerk`, diff --git a/js-old/src/i18n/zh-Hant-TW/settings.js b/js-old/src/i18n/zh-Hant-TW/settings.js index cbae3025fb5..8841279dc01 100644 --- a/js-old/src/i18n/zh-Hant-TW/settings.js +++ b/js-old/src/i18n/zh-Hant-TW/settings.js @@ -1,4 +1,4 @@ -// Copyright 2015-2018 Parity Technologies (UK) Ltd. +// Copyright 2015-2017 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -29,6 +29,7 @@ export default { chains: { chain_classic: `將Parity同步至以太坊經典網路`, // Parity syncs to the Ethereum Classic network chain_dev: `將Parity使用一條本地開發用區塊鏈`, // Parity uses a local development chain + chain_expanse: `將Parity同步至Expanse網路`, // Parity syncs to the Expanse network chain_foundation: `將Parity同步至以太坊基金會發起的以太坊網路`, // Parity syncs to the Ethereum network launched by the Ethereum Foundation chain_kovan: `將Parity同步至Kovan測試網路`, // Parity syncs to the Kovan test network chain_olympic: `將Parity同步至Olympic測試網路`, // Parity syncs to the Olympic test network diff --git a/js-old/src/i18n/zh/settings.js b/js-old/src/i18n/zh/settings.js index f8a5398fd01..4081a06d61d 100644 --- a/js-old/src/i18n/zh/settings.js +++ b/js-old/src/i18n/zh/settings.js @@ -1,4 +1,4 @@ -// Copyright 2015-2018 Parity Technologies (UK) Ltd. +// Copyright 2015-2017 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -29,6 +29,7 @@ export default { chains: { chain_classic: `将Parity同步至以太坊经典网络`, // Parity syncs to the Ethereum Classic network chain_dev: `将Parity使用一条本地开发用区块链`, // Parity uses a local development chain + chain_expanse: `将Parity同步至Expanse网络`, // Parity syncs to the Expanse network chain_foundation: `将Parity同步至以太坊基金会发起的以太坊网络`, // Parity syncs to the Ethereum network launched by the Ethereum Foundation chain_kovan: `将Parity同步至Kovan测试网络`, // Parity syncs to the Kovan test network chain_olympic: `将Parity同步至Olympic测试网络`, // Parity syncs to the Olympic test network diff --git a/js-old/src/ui/CurrencySymbol/currencySymbol.example.js b/js-old/src/ui/CurrencySymbol/currencySymbol.example.js index 9691e4f0301..c1b56ed5cfc 100644 --- a/js-old/src/ui/CurrencySymbol/currencySymbol.example.js +++ b/js-old/src/ui/CurrencySymbol/currencySymbol.example.js @@ -1,4 +1,4 @@ -// Copyright 2015-2018 Parity Technologies (UK) Ltd. +// Copyright 2015-2017 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -39,6 +39,12 @@ export default class CurrencySymbolExample extends Component { netChain='classic' /> + + + + ); } diff --git a/js-old/src/ui/CurrencySymbol/currencySymbol.js b/js-old/src/ui/CurrencySymbol/currencySymbol.js index b68f3c6f25c..3322b0301b7 100644 --- a/js-old/src/ui/CurrencySymbol/currencySymbol.js +++ b/js-old/src/ui/CurrencySymbol/currencySymbol.js @@ -1,4 +1,4 @@ -// Copyright 2015-2018 Parity Technologies (UK) Ltd. +// Copyright 2015-2017 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -19,6 +19,7 @@ import { connect } from 'react-redux'; const SYMBOL_ETC = 'ETC'; const SYMBOL_ETH = 'ETH'; +const SYMBOL_EXP = 'EXP'; export class CurrencySymbol extends Component { static propTypes = { @@ -41,6 +42,9 @@ export class CurrencySymbol extends Component { case 'classic': return SYMBOL_ETC; + case 'expanse': + return SYMBOL_EXP; + default: return SYMBOL_ETH; } diff --git a/js-old/src/ui/CurrencySymbol/currencySymbol.spec.js b/js-old/src/ui/CurrencySymbol/currencySymbol.spec.js index b4bca1ab0aa..e705b5edc21 100644 --- a/js-old/src/ui/CurrencySymbol/currencySymbol.spec.js +++ b/js-old/src/ui/CurrencySymbol/currencySymbol.spec.js @@ -1,4 +1,4 @@ -// Copyright 2015-2018 Parity Technologies (UK) Ltd. +// Copyright 2015-2017 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -70,6 +70,10 @@ describe('ui/CurrencySymbol', () => { expect(render('classic').text()).equal('ETC'); }); + it('renders EXP for expanse', () => { + expect(render('expanse').text()).equal('EXP'); + }); + it('renders ETH as default', () => { expect(render('somethingElse').text()).equal('ETH'); }); @@ -87,5 +91,9 @@ describe('ui/CurrencySymbol', () => { it('render ETC', () => { expect(render('classic').instance().renderSymbol()).equal('ETC'); }); + + it('render EXP', () => { + expect(render('expanse').instance().renderSymbol()).equal('EXP'); + }); }); }); diff --git a/js-old/src/views/Settings/Parity/parity.js b/js-old/src/views/Settings/Parity/parity.js index a670c8d4969..7de9b8061e1 100644 --- a/js-old/src/views/Settings/Parity/parity.js +++ b/js-old/src/views/Settings/Parity/parity.js @@ -1,4 +1,4 @@ -// Copyright 2015-2018 Parity Technologies (UK) Ltd. +// Copyright 2015-2017 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -253,6 +253,14 @@ export default class Parity extends Component { /> )) } + { + this.renderItem('expanse', ( + + )) + } { this.renderItem('dev', ( SpecType::Ropsten, "kovan" | "testnet" => SpecType::Kovan, "olympic" => SpecType::Olympic, + "expanse" => SpecType::Expanse, "musicoin" => SpecType::Musicoin, "ellaism" => SpecType::Ellaism, "dev" => SpecType::Dev, @@ -75,6 +77,7 @@ impl fmt::Display for SpecType { SpecType::Ropsten => "ropsten", SpecType::Olympic => "olympic", SpecType::Classic => "classic", + SpecType::Expanse => "expanse", SpecType::Musicoin => "musicoin", SpecType::Ellaism => "ellaism", SpecType::Kovan => "kovan", @@ -93,6 +96,7 @@ impl SpecType { SpecType::Ropsten => Ok(ethereum::new_ropsten(params)), SpecType::Olympic => Ok(ethereum::new_olympic(params)), SpecType::Classic => Ok(ethereum::new_classic(params)), + SpecType::Expanse => Ok(ethereum::new_expanse(params)), SpecType::Musicoin => Ok(ethereum::new_musicoin(params)), SpecType::Ellaism => Ok(ethereum::new_ellaism(params)), SpecType::Kovan => Ok(ethereum::new_kovan(params)), @@ -107,6 +111,7 @@ impl SpecType { pub fn legacy_fork_name(&self) -> Option { match *self { SpecType::Classic => Some("classic".to_owned()), + SpecType::Expanse => Some("expanse".to_owned()), SpecType::Musicoin => Some("musicoin".to_owned()), _ => None, } @@ -359,6 +364,7 @@ mod tests { assert_eq!(format!("{}", SpecType::Morden), "morden"); assert_eq!(format!("{}", SpecType::Olympic), "olympic"); assert_eq!(format!("{}", SpecType::Classic), "classic"); + assert_eq!(format!("{}", SpecType::Expanse), "expanse"); assert_eq!(format!("{}", SpecType::Musicoin), "musicoin"); assert_eq!(format!("{}", SpecType::Kovan), "kovan"); assert_eq!(format!("{}", SpecType::Dev), "dev"); diff --git a/rpc/src/v1/traits/parity_set.rs b/rpc/src/v1/traits/parity_set.rs index 3bd1ea70bec..40aad1a4bd9 100644 --- a/rpc/src/v1/traits/parity_set.rs +++ b/rpc/src/v1/traits/parity_set.rs @@ -1,4 +1,4 @@ -// Copyright 2015-2018 Parity Technologies (UK) Ltd. +// Copyright 2015-2017 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify @@ -87,7 +87,7 @@ build_rpc_trait! { #[rpc(name = "parity_setMode")] fn set_mode(&self, String) -> Result; - /// Set the network spec. Argument must be one of: "foundation", "ropsten", "morden", "kovan", "olympic", "classic", "dev", "musicoin" or a filename. + /// Set the network spec. Argument must be one of: "foundation", "ropsten", "morden", "kovan", "olympic", "classic", "dev", "expanse", "musicoin" or a filename. #[rpc(name = "parity_setChain")] fn set_spec_name(&self, String) -> Result;