Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Revert #7437
Browse files Browse the repository at this point in the history
  • Loading branch information
5chdn committed Jan 4, 2018
1 parent b16bf5f commit e5a2539
Show file tree
Hide file tree
Showing 16 changed files with 62 additions and 17 deletions.
5 changes: 5 additions & 0 deletions ethcore/src/ethereum/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ pub fn new_classic<'a, T: Into<SpecParams<'a>>>(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<SpecParams<'a>>>(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<SpecParams<'a>>>(params: T) -> Spec {
load(params.into(), include_bytes!("../../res/ethereum/musicoin.json"))
Expand Down
3 changes: 2 additions & 1 deletion js-old/src/i18n/_default/settings.js
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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`,
Expand Down
3 changes: 2 additions & 1 deletion js-old/src/i18n/nl/settings.js
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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`,
Expand Down
3 changes: 2 additions & 1 deletion js-old/src/i18n/zh-Hant-TW/settings.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion js-old/src/i18n/zh/settings.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion js-old/src/ui/CurrencySymbol/currencySymbol.example.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -39,6 +39,12 @@ export default class CurrencySymbolExample extends Component {
netChain='classic'
/>
</PlaygroundExample>

<PlaygroundExample name='EXP Currency Symbol'>
<CurrencySymbol
netChain='expanse'
/>
</PlaygroundExample>
</div>
);
}
Expand Down
6 changes: 5 additions & 1 deletion js-old/src/ui/CurrencySymbol/currencySymbol.js
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 = {
Expand All @@ -41,6 +42,9 @@ export class CurrencySymbol extends Component {
case 'classic':
return SYMBOL_ETC;

case 'expanse':
return SYMBOL_EXP;

default:
return SYMBOL_ETH;
}
Expand Down
10 changes: 9 additions & 1 deletion js-old/src/ui/CurrencySymbol/currencySymbol.spec.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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');
});
Expand All @@ -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');
});
});
});
10 changes: 9 additions & 1 deletion js-old/src/views/Settings/Parity/parity.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -253,6 +253,14 @@ export default class Parity extends Component {
/>
))
}
{
this.renderItem('expanse', (
<FormattedMessage
id='settings.parity.chains.chain_expanse'
defaultMessage='Parity syncs to the Expanse network'
/>
))
}
{
this.renderItem('dev', (
<FormattedMessage
Expand Down
3 changes: 2 additions & 1 deletion js/i18n/_default/settings.js
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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_musicoin: `Parity syncs to the Musicoin network`,
chain_foundation: `Parity syncs to the Ethereum network launched by the Ethereum Foundation`,
chain_kovan: `Parity syncs to the Kovan test network`,
Expand Down
3 changes: 2 additions & 1 deletion js/i18n/nl/settings.js
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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_musicoin: `Parity synchroniseert met het Musicoin 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`,
Expand Down
3 changes: 2 additions & 1 deletion js/i18n/zh-Hant-TW/settings.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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_musicoin: `將Parity同步至Musicoin網路`, // Parity syncs to the Musicoin 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
Expand Down
3 changes: 2 additions & 1 deletion js/i18n/zh/settings.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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_musicoin: `将Parity同步至Musicoin网络`, // Parity syncs to the Musicoin 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
Expand Down
4 changes: 2 additions & 2 deletions parity/cli/mod.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -290,7 +290,7 @@ usage! {

ARG arg_chain: (String) = "foundation", or |c: &Config| otry!(c.parity).chain.clone(),
"--chain=[CHAIN]",
"Specify the blockchain type. CHAIN may be either a JSON chain specification file or olympic, frontier, homestead, mainnet, morden, ropsten, classic, musicoin, ellaism, 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, testnet, kovan or dev.",

ARG arg_keys_path: (String) = "$BASE/keys", or |c: &Config| otry!(c.parity).keys_path.clone(),
"--keys-path=[PATH]",
Expand Down
8 changes: 7 additions & 1 deletion parity/params.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -35,6 +35,7 @@ pub enum SpecType {
Kovan,
Olympic,
Classic,
Expanse,
Musicoin,
Ellaism,
Dev,
Expand All @@ -58,6 +59,7 @@ impl str::FromStr for SpecType {
"ropsten" => SpecType::Ropsten,
"kovan" | "testnet" => SpecType::Kovan,
"olympic" => SpecType::Olympic,
"expanse" => SpecType::Expanse,
"musicoin" => SpecType::Musicoin,
"ellaism" => SpecType::Ellaism,
"dev" => SpecType::Dev,
Expand All @@ -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",
Expand All @@ -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)),
Expand All @@ -107,6 +111,7 @@ impl SpecType {
pub fn legacy_fork_name(&self) -> Option<String> {
match *self {
SpecType::Classic => Some("classic".to_owned()),
SpecType::Expanse => Some("expanse".to_owned()),
SpecType::Musicoin => Some("musicoin".to_owned()),
_ => None,
}
Expand Down Expand Up @@ -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");
Expand Down
4 changes: 2 additions & 2 deletions rpc/src/v1/traits/parity_set.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -87,7 +87,7 @@ build_rpc_trait! {
#[rpc(name = "parity_setMode")]
fn set_mode(&self, String) -> Result<bool>;

/// 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<bool>;

Expand Down

0 comments on commit e5a2539

Please sign in to comment.