diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5379994e5..9b538db2a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -471,13 +471,13 @@ docker-build:
stage: build
only:
- tags
+ - triggers
before_script:
- docker info
script:
- - cd docker/hub
- - if [ "$CI_BUILD_REF_NAME" == "nightly" ]; then DOCKER_TAG="latest"; else DOCKER_TAG=$CI_BUILD_REF_NAME; fi
+ - if [ "$CI_BUILD_REF_NAME" == "beta-release" ]; then DOCKER_TAG="latest"; else DOCKER_TAG=$CI_BUILD_REF_NAME; fi
- docker login -u $Docker_Hub_User -p $Docker_Hub_Pass
- - scripts/docker-build.sh $DOCKER_TAG
+ - sh scripts/docker-build.sh $DOCKER_TAG
tags:
- docker
test-darwin:
diff --git a/ethcore/res/ethereum/classic.json b/ethcore/res/ethereum/classic.json
index c1879d459..19416d0df 100644
--- a/ethcore/res/ethereum/classic.json
+++ b/ethcore/res/ethereum/classic.json
@@ -47,16 +47,17 @@
"stateRoot": "0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544"
},
"nodes": [
- "enode://08c7ee6a4f861ff0664a49532bcc86de1363acd608999d1b76609bb9bc278649906f069057630fd9493924a368b5d1dc9b8f8bf13ac26df72512f6d1fabd8c95@45.32.7.81:30303",
- "enode://e809c4a2fec7daed400e5e28564e23693b23b2cc5a019b612505631bbe7b9ccf709c1796d2a3d29ef2b045f210caf51e3c4f5b6d3587d43ad5d6397526fa6179@174.112.32.157:30303",
+ "enode://a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c@52.16.188.185:30303",
+ "enode://7ff0a073bf2ee9e94fae86de914eca0c0266c0b7051f4592ff0e9820706a085919ea667459897cde4efe3f0465f608cf402bde861983ce6ae3f9185df371aea7@138.197.135.19:30303",
+ "enode://ffea3b01c000cdd89e1e9229fea3e80e95b646f9b2aa55071fc865e2f19543c9b06045cc2e69453e6b78100a119e66be1b5ad50b36f2ffd27293caa28efdd1b2@162.243.55.45:30303",
"enode://687be94c3a7beaa3d2fde82fa5046cdeb3e8198354e05b29d6e0d4e276713e3707ac10f784a7904938b06b46c764875c241b0337dd853385a4d8bfcbf8190647@95.183.51.229:30303",
- "enode://6e538e7c1280f0a31ff08b382db5302480f775480b8e68f8febca0ceff81e4b19153c6f8bf60313b93bef2cc34d34e1df41317de0ce613a201d1660a788a03e2@52.206.67.235:30303",
- "enode://ca5ae4eca09ba6787e29cf6d86f7634d07aae6b9e6317a59aff675851c0bf445068173208cf8ef7f5cd783d8e29b85b2fa3fa358124cf0546823149724f9bde1@138.68.1.16:30303",
"enode://217ebe27e89bf4fec8ce06509323ff095b1014378deb75ab2e5f6759a4e8750a3bd8254b8c6833136e4d5e58230d65ee8ab34a5db5abf0640408c4288af3c8a7@188.138.1.237:30303",
"enode://fa20444ef991596ce99b81652ac4e61de1eddc4ff21d3cd42762abd7ed47e7cf044d3c9ccddaf6035d39725e4eb372806787829ccb9a08ec7cb71883cb8c3abd@50.149.116.182:30303",
"enode://4bd6a4df3612c718333eb5ea7f817923a8cdf1bed89cee70d1710b45a0b6b77b2819846440555e451a9b602ad2efa2d2facd4620650249d8468008946887820a@71.178.232.20:30304",
+ "enode://08c7ee6a4f861ff0664a49532bcc86de1363acd608999d1b76609bb9bc278649906f069057630fd9493924a368b5d1dc9b8f8bf13ac26df72512f6d1fabd8c95@45.32.7.81:30303",
"enode://921cf8e4c345fe8db913c53964f9cadc667644e7f20195a0b7d877bd689a5934e146ff2c2259f1bae6817b6585153a007ceb67d260b720fa3e6fc4350df25c7f@51.255.49.170:30303",
- "enode://ffea3b01c000cdd89e1e9229fea3e80e95b646f9b2aa55071fc865e2f19543c9b06045cc2e69453e6b78100a119e66be1b5ad50b36f2ffd27293caa28efdd1b2@128.199.93.177:3030",
+ "enode://ffea3b01c000cdd89e1e9229fea3e80e95b646f9b2aa55071fc865e2f19543c9b06045cc2e69453e6b78100a119e66be1b5ad50b36f2ffd27293caa28efdd1b2@128.199.93.177:30303",
+ "enode://ca5ae4eca09ba6787e29cf6d86f7634d07aae6b9e6317a59aff675851c0bf445068173208cf8ef7f5cd783d8e29b85b2fa3fa358124cf0546823149724f9bde1@138.68.1.16:30303",
"enode://ee3da491ce6a155eb132708eb0e8d04b0637926ec0ae1b79e63fc97cb9fc3818f49250a0ae0d7f79ed62b66ec677f408c4e01741504dc7a051e274f1e803d454@91.121.65.179:40404",
"enode://48e063a6cf5f335b1ef2ed98126bf522cf254396f850c7d442fe2edbbc23398787e14cd4de7968a00175a82762de9cbe9e1407d8ccbcaeca5004d65f8398d759@159.203.255.59:30303"
],
diff --git a/ethcore/res/ethereum/frontier.json b/ethcore/res/ethereum/foundation.json
similarity index 99%
rename from ethcore/res/ethereum/frontier.json
rename to ethcore/res/ethereum/foundation.json
index 91a8ae9e6..408a34014 100644
--- a/ethcore/res/ethereum/frontier.json
+++ b/ethcore/res/ethereum/foundation.json
@@ -1,5 +1,5 @@
{
- "name": "Frontier/Homestead",
+ "name": "Foundation",
"dataDir": "ethereum",
"engine": {
"Ethash": {
@@ -9,7 +9,7 @@
"difficultyBoundDivisor": "0x0800",
"durationLimit": "0x0d",
"blockReward": "0x4563918244F40000",
- "registrar" : "0x3bb2bb5c6c9c9b7f4ef430b47dc7e026310042ea",
+ "registrar" : "0xe3389675d0338462dC76C6f9A3e432550c36A142",
"homesteadTransition": "0x118c30",
"daoHardforkTransition": "0x1d4c00",
"daoHardforkBeneficiary": "0xbf4ed7b27f1d666546e30d74d50d173d20bca754",
diff --git a/ethcore/res/ethereum/kovan.json b/ethcore/res/ethereum/kovan.json
new file mode 100644
index 000000000..e9c059aaa
--- /dev/null
+++ b/ethcore/res/ethereum/kovan.json
@@ -0,0 +1,59 @@
+{
+ "name": "Kovan",
+ "dataDir": "kovan",
+ "engine": {
+ "authorityRound": {
+ "params": {
+ "gasLimitBoundDivisor": "0x400",
+ "registrar" : "0xfAb104398BBefbd47752E7702D9fE23047E1Bca3",
+ "stepDuration": "4",
+ "blockReward": "0x4563918244F40000",
+ "validators" : {
+ "list": [
+ "0x00D6Cc1BA9cf89BD2e58009741f4F7325BAdc0ED",
+ "0x00427feae2419c15b89d1c21af10d1b6650a4d3d",
+ "0x4Ed9B08e6354C70fE6F8CB0411b0d3246b424d6c",
+ "0x0020ee4Be0e2027d76603cB751eE069519bA81A1",
+
+ "0x0010f94b296a852aaac52ea6c5ac72e03afd032d",
+
+ "0x007733a1FE69CF3f2CF989F81C7b4cAc1693387A",
+ "0x00E6d2b931F55a3f1701c7389d592a7778897879",
+ "0x00e4a10650e5a6D6001C38ff8E64F97016a1645c",
+
+ "0x00a0a24b9f0e5ec7aa4c7389b8302fd0123194de"
+ ]
+ }
+ }
+ }
+ },
+ "params": {
+ "maximumExtraDataSize": "0x20",
+ "minGasLimit": "0x1388",
+ "networkID" : "0x2A"
+ },
+ "genesis": {
+ "seal": {
+ "authorityRound": {
+ "step": "0x0",
+ "signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
+ }
+ },
+ "difficulty": "0x20000",
+ "gasLimit": "0x5B8D80"
+ },
+ "accounts": {
+ "0x0000000000000000000000000000000000000001": { "balance": "1", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } },
+ "0x0000000000000000000000000000000000000002": { "balance": "1", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
+ "0x0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
+ "0x0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
+ "0x00521965e7bd230323c423d96c657db5b79d099f": { "balance": "1606938044258990275541962092341162602522202993782792835301376" }
+ },
+ "nodes": [
+ "enode://c005dd308256c60fab247813d8bf6d6e81f9cd354287837eb1c2fcf294adaa913a3208e88900ef5c55a8cba7042c301d80503edec2ad3f92a72e241ee6743854@192.241.230.87:30303",
+ "enode://48caeceb2724f2f71406990aa81efe87f8c53f26441d891473da2ae50cc138f238addc0e46b5aee240db55de8c711daac53d7b32a3f13e30edb86a3ca7c2700b@138.68.143.220:30303",
+ "enode://85705212fd28ebdd56669fb55e958feb9d81f74fe76c82f867564b6c2995e69f596df0f588eba16f1a43b69ce06485d68231a0c83fed8469b41eba0e390c126f@139.59.146.42:30303",
+ "enode://2aa81bd0a761cd4f02c934dcf3f81c5b65953e51ab5ba03ceb1f125eb06418a1cdffb1c9d01871aa7bd456f3fce35e745608189ad1164f72b2161634b0c3f6ea@188.166.240.190:30303",
+ "enode://c5900cdd6d20795d58372f42dfbab9d664c27bb97e9c27972741942736e919122f9bac28e74cbc58e4ff195475ea90d9880b71a37af5b5a8cb41d843f765cff8@174.138.79.48:30303"
+ ]
+}
diff --git a/ethcore/src/ethereum/mod.rs b/ethcore/src/ethereum/mod.rs
index cf7f4ba06..3d336ce9f 100644
--- a/ethcore/src/ethereum/mod.rs
+++ b/ethcore/src/ethereum/mod.rs
@@ -30,11 +30,14 @@ pub use self::denominations::*;
use super::spec::*;
/// Most recent fork block that we support on Mainnet.
-pub const FORK_SUPPORTED_FRONTIER: u64 = 2675000;
+pub const FORK_SUPPORTED_FOUNDATION: u64 = 2675000;
/// Most recent fork block that we support on Ropsten.
pub const FORK_SUPPORTED_ROPSTEN: u64 = 10;
+/// Most recent fork block that we support on Kovan.
+pub const FORK_SUPPORTED_KOVAN: u64 = 0;
+
fn load(b: &[u8]) -> Spec {
Spec::load(b).expect("chain spec is invalid")
}
@@ -43,14 +46,17 @@ fn load(b: &[u8]) -> Spec {
pub fn new_olympic() -> Spec { load(include_bytes!("../../res/ethereum/olympic.json")) }
/// Create a new Frontier mainnet chain spec.
-pub fn new_frontier() -> Spec { load(include_bytes!("../../res/ethereum/frontier.json")) }
+pub fn new_foundation() -> Spec { load(include_bytes!("../../res/ethereum/foundation.json")) }
/// Create a new Frontier mainnet chain spec without the DAO hardfork.
pub fn new_classic() -> Spec { load(include_bytes!("../../res/ethereum/classic.json")) }
-/// Create a new Frontier mainnet chain spec without the DAO hardfork.
+/// Create a new Expanse mainnet chain spec.
pub fn new_expanse() -> Spec { load(include_bytes!("../../res/ethereum/expanse.json")) }
+/// Create a new Kovan testnet chain spec.
+pub fn new_kovan() -> Spec { load(include_bytes!("../../res/ethereum/kovan.json")) }
+
/// Create a new Frontier chain spec as though it never changes to Homestead.
pub fn new_frontier_test() -> Spec { load(include_bytes!("../../res/ethereum/frontier_test.json")) }
@@ -112,7 +118,7 @@ mod tests {
#[test]
fn frontier() {
- let frontier = new_frontier();
+ let frontier = new_foundation();
assert_eq!(frontier.state_root(), "d7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544".into());
let genesis = frontier.genesis_block();
diff --git a/ethcore/src/miner/mod.rs b/ethcore/src/miner/mod.rs
index 312dcfd33..175364c3f 100644
--- a/ethcore/src/miner/mod.rs
+++ b/ethcore/src/miner/mod.rs
@@ -32,7 +32,7 @@
//! use ethcore::miner::{Miner, MinerService};
//!
//! fn main() {
-//! let miner: Miner = Miner::with_spec(ðereum::new_frontier());
+//! let miner: Miner = Miner::with_spec(ðereum::new_foundation());
//! // get status
//! assert_eq!(miner.status().transactions_in_pending_queue, 0);
//!
diff --git a/js/assets/fonts/Roboto/font.css b/js/assets/fonts/Roboto/font.css
index 5eea2bfd1..75226e621 100644
--- a/js/assets/fonts/Roboto/font.css
+++ b/js/assets/fonts/Roboto/font.css
@@ -3,7 +3,7 @@
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
- src: local('Roboto Light'), local('Roboto-Light'), url(v15/0eC6fl06luXEYWpBSJvXCIX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');
+ src: local('Roboto Light'), local('Roboto-Light'), url(./v15/0eC6fl06luXEYWpBSJvXCIX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@@ -11,7 +11,7 @@
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
- src: local('Roboto Light'), local('Roboto-Light'), url(v15/Fl4y0QdOxyyTHEGMXX8kcYX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');
+ src: local('Roboto Light'), local('Roboto-Light'), url(./v15/Fl4y0QdOxyyTHEGMXX8kcYX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@@ -19,7 +19,7 @@
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
- src: local('Roboto Light'), local('Roboto-Light'), url(v15/-L14Jk06m6pUHB-5mXQQnYX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');
+ src: local('Roboto Light'), local('Roboto-Light'), url(./v15/-L14Jk06m6pUHB-5mXQQnYX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@@ -27,7 +27,7 @@
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
- src: local('Roboto Light'), local('Roboto-Light'), url(v15/I3S1wsgSg9YCurV6PUkTOYX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');
+ src: local('Roboto Light'), local('Roboto-Light'), url(./v15/I3S1wsgSg9YCurV6PUkTOYX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@@ -35,7 +35,7 @@
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
- src: local('Roboto Light'), local('Roboto-Light'), url(v15/NYDWBdD4gIq26G5XYbHsFIX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');
+ src: local('Roboto Light'), local('Roboto-Light'), url(./v15/NYDWBdD4gIq26G5XYbHsFIX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@@ -43,7 +43,7 @@
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
- src: local('Roboto Light'), local('Roboto-Light'), url(v15/Pru33qjShpZSmG3z6VYwnYX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');
+ src: local('Roboto Light'), local('Roboto-Light'), url(./v15/Pru33qjShpZSmG3z6VYwnYX0hVgzZQUfRDuZrPvH3D8.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@@ -51,6 +51,6 @@
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
- src: local('Roboto Light'), local('Roboto-Light'), url(v15/Hgo13k-tfSpn0qi1SFdUfZBw1xU1rKptJj_0jans920.woff2) format('woff2');
+ src: local('Roboto Light'), local('Roboto-Light'), url(./v15/Hgo13k-tfSpn0qi1SFdUfZBw1xU1rKptJj_0jans920.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
diff --git a/js/assets/fonts/RobotoMono/font.css b/js/assets/fonts/RobotoMono/font.css
index 5e9ab5721..6a86af729 100644
--- a/js/assets/fonts/RobotoMono/font.css
+++ b/js/assets/fonts/RobotoMono/font.css
@@ -3,7 +3,7 @@
font-family: 'Roboto Mono';
font-style: normal;
font-weight: 300;
- src: local('Roboto Mono Light'), local('RobotoMono-Light'), url(v4/N4duVc9C58uwPiY8_59Fz0ExlR2MysFCBK8OirNw2kM.woff2) format('woff2');
+ src: local('Roboto Mono Light'), local('RobotoMono-Light'), url(./v4/N4duVc9C58uwPiY8_59Fz0ExlR2MysFCBK8OirNw2kM.woff2) format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@@ -11,7 +11,7 @@
font-family: 'Roboto Mono';
font-style: normal;
font-weight: 300;
- src: local('Roboto Mono Light'), local('RobotoMono-Light'), url(v4/N4duVc9C58uwPiY8_59Fz2dsm03krrxlabhmVQFB99s.woff2) format('woff2');
+ src: local('Roboto Mono Light'), local('RobotoMono-Light'), url(./v4/N4duVc9C58uwPiY8_59Fz2dsm03krrxlabhmVQFB99s.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@@ -19,7 +19,7 @@
font-family: 'Roboto Mono';
font-style: normal;
font-weight: 300;
- src: local('Roboto Mono Light'), local('RobotoMono-Light'), url(v4/N4duVc9C58uwPiY8_59FzyJ0caWjaSBdV-xZbEgst_k.woff2) format('woff2');
+ src: local('Roboto Mono Light'), local('RobotoMono-Light'), url(./v4/N4duVc9C58uwPiY8_59FzyJ0caWjaSBdV-xZbEgst_k.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@@ -27,7 +27,7 @@
font-family: 'Roboto Mono';
font-style: normal;
font-weight: 300;
- src: local('Roboto Mono Light'), local('RobotoMono-Light'), url(v4/N4duVc9C58uwPiY8_59Fz2MSHb9EAJwuSzGfuRChQzQ.woff2) format('woff2');
+ src: local('Roboto Mono Light'), local('RobotoMono-Light'), url(./v4/N4duVc9C58uwPiY8_59Fz2MSHb9EAJwuSzGfuRChQzQ.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@@ -35,7 +35,7 @@
font-family: 'Roboto Mono';
font-style: normal;
font-weight: 300;
- src: local('Roboto Mono Light'), local('RobotoMono-Light'), url(v4/N4duVc9C58uwPiY8_59Fz-pRBTtN4E2_qSPBnw6AgMc.woff2) format('woff2');
+ src: local('Roboto Mono Light'), local('RobotoMono-Light'), url(./v4/N4duVc9C58uwPiY8_59Fz-pRBTtN4E2_qSPBnw6AgMc.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@@ -43,7 +43,7 @@
font-family: 'Roboto Mono';
font-style: normal;
font-weight: 300;
- src: local('Roboto Mono Light'), local('RobotoMono-Light'), url(v4/N4duVc9C58uwPiY8_59Fz9Dnm4qiMZlH5rhYv_7LI2Y.woff2) format('woff2');
+ src: local('Roboto Mono Light'), local('RobotoMono-Light'), url(./v4/N4duVc9C58uwPiY8_59Fz9Dnm4qiMZlH5rhYv_7LI2Y.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@@ -51,6 +51,6 @@
font-family: 'Roboto Mono';
font-style: normal;
font-weight: 300;
- src: local('Roboto Mono Light'), local('RobotoMono-Light'), url(v4/N4duVc9C58uwPiY8_59Fz9TIkQYohD4BpHvJ3NvbHoA.woff2) format('woff2');
+ src: local('Roboto Mono Light'), local('RobotoMono-Light'), url(./v4/N4duVc9C58uwPiY8_59Fz9TIkQYohD4BpHvJ3NvbHoA.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
diff --git a/js/package.json b/js/package.json
index f214c33df..a0ab08ec1 100644
--- a/js/package.json
+++ b/js/package.json
@@ -188,6 +188,7 @@
"scryptsy": "2.0.0",
"solc": "ngotchac/solc-js",
"store": "1.3.20",
+ "uglify-js": "2.8.2",
"useragent.js": "0.5.6",
"utf8": "2.1.2",
"valid-url": "1.0.9",
diff --git a/js/src/contracts/abi/index.js b/js/src/contracts/abi/index.js
index ec5b49383..6e88fea95 100644
--- a/js/src/contracts/abi/index.js
+++ b/js/src/contracts/abi/index.js
@@ -14,34 +14,18 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see .
-import badgereg from './badgereg.json';
-import basiccoin from './basiccoin.json';
-import basiccoinmanager from './basiccoinmanager.json';
-import dappreg from './dappreg.json';
-import eip20 from './eip20.json';
-import emailverification from './email-verification.json';
-import gavcoin from './gavcoin.json';
-import githubhint from './githubhint.json';
-import owned from './owned.json';
-import registry from './registry.json';
-import signaturereg from './signaturereg.json';
-import smsverification from './sms-verification.json';
-import tokenreg from './tokenreg.json';
-import wallet from './wallet.json';
-
-export {
- badgereg,
- basiccoin,
- basiccoinmanager,
- dappreg,
- eip20,
- emailverification,
- gavcoin,
- githubhint,
- owned,
- registry,
- signaturereg,
- smsverification,
- tokenreg,
- wallet
-};
+export badgereg from './badgereg.json';
+export basiccoin from './basiccoin.json';
+export basiccoinmanager from './basiccoinmanager.json';
+export dappreg from './dappreg.json';
+export eip20 from './eip20.json';
+export emailverification from './email-verification.json';
+export gavcoin from './gavcoin.json';
+export githubhint from './githubhint.json';
+export owned from './owned.json';
+export registry from './registry.json';
+export registry2 from './registry2.json';
+export signaturereg from './signaturereg.json';
+export smsverification from './sms-verification.json';
+export tokenreg from './tokenreg.json';
+export wallet from './wallet.json';
diff --git a/js/src/contracts/abi/registry2.json b/js/src/contracts/abi/registry2.json
new file mode 100644
index 000000000..922b9b7e2
--- /dev/null
+++ b/js/src/contracts/abi/registry2.json
@@ -0,0 +1 @@
+[{"constant":true,"inputs":[{"name":"_data","type":"address"}],"name":"canReverse","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_new","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"},{"name":"_value","type":"bytes32"}],"name":"setData","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"}],"name":"confirmReverse","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"bytes32"}],"name":"reserve","outputs":[{"name":"success","type":"bool"}],"payable":true,"type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"bytes32"}],"name":"drop","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"}],"name":"getAddress","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"setFee","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_to","type":"address"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"}],"name":"getData","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_name","type":"bytes32"}],"name":"reserved","outputs":[{"name":"reserved","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"drain","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_who","type":"address"}],"name":"proposeReverse","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_name","type":"bytes32"}],"name":"hasReverse","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"}],"name":"getUint","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"fee","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_name","type":"bytes32"}],"name":"getOwner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_name","type":"bytes32"}],"name":"getReverse","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_data","type":"address"}],"name":"reverse","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"},{"name":"_value","type":"uint256"}],"name":"setUint","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_who","type":"address"}],"name":"confirmReverseAs","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"removeReverse","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_key","type":"string"},{"name":"_value","type":"address"}],"name":"setAddress","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"Drained","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"FeeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"string"},{"indexed":true,"name":"reverse","type":"address"}],"name":"ReverseProposed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"string"},{"indexed":true,"name":"reverse","type":"address"}],"name":"ReverseConfirmed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"string"},{"indexed":true,"name":"reverse","type":"address"}],"name":"ReverseRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"},{"indexed":true,"name":"owner","type":"address"}],"name":"Reserved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"},{"indexed":true,"name":"oldOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"Transferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"},{"indexed":true,"name":"owner","type":"address"}],"name":"Dropped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"},{"indexed":true,"name":"key","type":"string"},{"indexed":false,"name":"plainKey","type":"string"}],"name":"DataChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"old","type":"address"},{"indexed":true,"name":"current","type":"address"}],"name":"NewOwner","type":"event"}]
diff --git a/js/src/dapps/basiccoin/services.js b/js/src/dapps/basiccoin/services.js
index b854708e3..f3e83c482 100644
--- a/js/src/dapps/basiccoin/services.js
+++ b/js/src/dapps/basiccoin/services.js
@@ -121,7 +121,7 @@ export function attachInstances () {
])
.then(([registryAddress, netChain]) => {
const registry = api.newContract(abis.registry, registryAddress).instance;
- isTest = ['morden', 'ropsten', 'testnet'].includes(netChain);
+ isTest = ['kovan', 'morden', 'ropsten', 'testnet'].includes(netChain);
console.log(`contract was found at registry=${registryAddress}`);
console.log(`running on ${netChain}, isTest=${isTest}`);
diff --git a/js/src/dapps/registry/Events/events.js b/js/src/dapps/registry/Events/events.js
index d204822d1..b44c59055 100644
--- a/js/src/dapps/registry/Events/events.js
+++ b/js/src/dapps/registry/Events/events.js
@@ -53,7 +53,13 @@ const renderEvent = (classNames, verb) => (e) => {
return (
-
+
|
{ verb }
@@ -79,17 +85,23 @@ const renderDataChanged = (e) => {
return (
|
-
+
|
updated
|
- { 'key ' }
+ key
{ new Buffer(e.parameters.plainKey.value).toString('utf8') }
- { 'of ' }
+ of
diff --git a/js/src/dapps/registry/actions.js b/js/src/dapps/registry/actions.js
index 6f4cef8e9..a798dd363 100644
--- a/js/src/dapps/registry/actions.js
+++ b/js/src/dapps/registry/actions.js
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see .
-import { registry as registryAbi } from '~/contracts/abi';
+import { registry as registryAbi, registry2 as registryAbi2 } from '~/contracts/abi';
import { api } from './parity.js';
import * as addresses from './addresses/actions.js';
@@ -27,15 +27,21 @@ import * as reverse from './Reverse/actions.js';
export { addresses, accounts, lookup, events, names, records, reverse };
+const REGISTRY_V1_HASHES = [
+ '0x34f7c51bbb1b1902fbdabfdf04811100f5c9f998f26dd535d2f6f977492c748e', // ropsten
+ '0x64c3ee34851517a9faecd995c102b339f03e564ad6772dc43a26f993238b20ec' // homestead
+];
+
export const setIsTestnet = (isTestnet) => ({ type: 'set isTestnet', isTestnet });
export const fetchIsTestnet = () => (dispatch) =>
api.net.version()
.then((netVersion) => {
- dispatch(setIsTestnet(
- netVersion === '2' || // morden
- netVersion === '3' // ropsten
- ));
+ dispatch(setIsTestnet([
+ '2', // morden
+ '3', // ropsten
+ '42' // kovan
+ ].includes(netVersion)));
})
.catch((err) => {
console.error('could not check if testnet');
@@ -47,12 +53,28 @@ export const fetchIsTestnet = () => (dispatch) =>
export const setContract = (contract) => ({ type: 'set contract', contract });
export const fetchContract = () => (dispatch) =>
- api.parity.registryAddress()
+ api.parity
+ .registryAddress()
.then((address) => {
- const contract = api.newContract(registryAbi, address);
- dispatch(setContract(contract));
- dispatch(fetchFee());
- dispatch(fetchOwner());
+ return api.eth
+ .getCode(address)
+ .then((code) => {
+ const codeHash = api.util.sha3(code);
+ const isVersion1 = REGISTRY_V1_HASHES.includes(codeHash);
+
+ console.log(`registry at ${address}, code ${codeHash}, version ${isVersion1 ? 1 : 2}`);
+
+ const contract = api.newContract(
+ isVersion1
+ ? registryAbi
+ : registryAbi2,
+ address
+ );
+
+ dispatch(setContract(contract));
+ dispatch(fetchFee());
+ dispatch(fetchOwner());
+ });
})
.catch((err) => {
console.error('could not fetch contract');
diff --git a/js/src/dapps/tokenreg/Inputs/Text/input-text.js b/js/src/dapps/tokenreg/Inputs/Text/input-text.js
index 3ddd7591f..dc3a6a1e8 100644
--- a/js/src/dapps/tokenreg/Inputs/Text/input-text.js
+++ b/js/src/dapps/tokenreg/Inputs/Text/input-text.js
@@ -105,22 +105,22 @@ export default class InputText extends Component {
const validation = validate(value, validationType, contract);
- if (validation instanceof Promise) {
+ const loadingTimeout = setTimeout(() => {
this.setState({ disabled: true, loading: true });
+ }, 50);
- return validation
- .then(validation => {
- this.setValidation({
- ...validation,
- disabled: false,
- loading: false
- });
+ return Promise.resolve(validation)
+ .then((validation) => {
+ clearTimeout(loadingTimeout);
- event.target.focus();
+ this.setValidation({
+ ...validation,
+ disabled: false,
+ loading: false
});
- }
- this.setValidation(validation);
+ event.target.focus();
+ });
}
onKeyDown = (event) => {
diff --git a/js/src/dapps/tokenreg/Tokens/Token/token.css b/js/src/dapps/tokenreg/Tokens/Token/token.css
index 6372eb57c..eec1b1660 100644
--- a/js/src/dapps/tokenreg/Tokens/Token/token.css
+++ b/js/src/dapps/tokenreg/Tokens/Token/token.css
@@ -49,7 +49,7 @@
}
.token-container {
- flex: 1;
+ flex: 1 1 auto;
}
.full-width .token-container {
diff --git a/js/src/redux/providers/status.js b/js/src/redux/providers/status.js
index 8456f2d9a..d1a17532b 100644
--- a/js/src/redux/providers/status.js
+++ b/js/src/redux/providers/status.js
@@ -288,9 +288,11 @@ export default class Status {
.then(([
netPeers, clientVersion, netVersion, defaultExtraData, netChain, netPort, rpcSettings, enode, upgradeStatus
]) => {
- const isTest =
- netVersion === '2' || // morden
- netVersion === '3'; // ropsten
+ const isTest = [
+ '2', // morden
+ '3', // ropsten
+ '42' // kovan
+ ].includes(netVersion);
const longStatus = {
netPeers,
diff --git a/js/src/ui/Form/Input/input.js b/js/src/ui/Form/Input/input.js
index a24dd13cb..55f7ec5e4 100644
--- a/js/src/ui/Form/Input/input.js
+++ b/js/src/ui/Form/Input/input.js
@@ -46,6 +46,10 @@ const UNDERLINE_FOCUSED = {
const NAME_ID = ' ';
export default class Input extends Component {
+ static contextTypes = {
+ intl: React.PropTypes.object.isRequired
+ };
+
static propTypes = {
allowCopy: PropTypes.oneOfType([
PropTypes.string,
@@ -78,7 +82,8 @@ export default class Input extends Component {
style: PropTypes.object,
value: PropTypes.oneOfType([
PropTypes.number,
- PropTypes.string
+ PropTypes.string,
+ PropTypes.node
])
};
@@ -134,6 +139,13 @@ export default class Input extends Component {
? UNDERLINE_FOCUSED
: readOnly && typeof focused !== 'boolean' ? { display: 'none' } : null;
+ const textValue = typeof value !== 'string' && (value && value.props)
+ ? this.context.intl.formatMessage(
+ value.props,
+ value.props.values || {}
+ )
+ : value;
+
return (
{ this.renderCopyButton() }
@@ -168,7 +180,8 @@ export default class Input extends Component {
underlineStyle={ underlineStyle }
underlineFocusStyle={ underlineFocusStyle }
underlineShow={ !hideUnderline }
- value={ value }>
+ value={ textValue }
+ >
{ children }
diff --git a/js/src/ui/Portal/portal.js b/js/src/ui/Portal/portal.js
index e0d8d5181..3307a4f1d 100644
--- a/js/src/ui/Portal/portal.js
+++ b/js/src/ui/Portal/portal.js
@@ -14,7 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see .
-import EventListener from 'react-event-listener';
import React, { Component, PropTypes } from 'react';
import ReactDOM from 'react-dom';
import ReactPortal from 'react-portal';
@@ -23,6 +22,7 @@ import keycode from 'keycode';
import { nodeOrStringProptype } from '~/util/proptypes';
import { CloseIcon } from '~/ui/Icons';
import ParityBackground from '~/ui/ParityBackground';
+import StackEventListener from '~/ui/StackEventListener';
import Title from '~/ui/Title';
import styles from './portal.css';
@@ -92,10 +92,7 @@ export default class Portal extends Component {
onClick={ this.stopEvent }
onKeyDown={ this.handleKeyDown }
>
-
+
{ this.renderClose() }
.
+
+export default from './stackEventListener';
diff --git a/js/src/ui/StackEventListener/stackEventListener.js b/js/src/ui/StackEventListener/stackEventListener.js
new file mode 100644
index 000000000..586ddcad6
--- /dev/null
+++ b/js/src/ui/StackEventListener/stackEventListener.js
@@ -0,0 +1,56 @@
+// Copyright 2015-2017 Parity Technologies (UK) Ltd.
+// This file is part of Parity.
+
+// Parity is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Parity is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Parity. If not, see .
+
+import ReactEventListener from 'react-event-listener';
+import React, { Component, PropTypes } from 'react';
+
+let listenerId = 0;
+let listenerIds = [];
+
+export default class StackEventListener extends Component {
+ static propTypes = {
+ onKeyUp: PropTypes.func.isRequired
+ };
+
+ componentWillMount () {
+ // Add to the list of listeners on mount
+ this.id = ++listenerId;
+ listenerIds.push(this.id);
+ }
+
+ componentWillUnmount () {
+ // Remove from the listeners list on unmount
+ listenerIds = listenerIds.filter((id) => this.id !== id);
+ }
+
+ render () {
+ return (
+
+ );
+ }
+
+ handleKeyUp = (event) => {
+ // Only handle event if last of the listeners list
+ if (this.id !== listenerIds.slice(-1)[0]) {
+ return event;
+ }
+
+ return this.props.onKeyUp(event);
+ }
+}
diff --git a/js/src/views/ParityBar/parityBar.css b/js/src/views/ParityBar/parityBar.css
index 980638c12..5165cf70e 100644
--- a/js/src/views/ParityBar/parityBar.css
+++ b/js/src/views/ParityBar/parityBar.css
@@ -55,6 +55,7 @@ $modalZ: 10001;
.container {
display: flex;
flex-direction: column;
+ width: 100%;
}
.overlay {
@@ -114,7 +115,8 @@ $modalZ: 10001;
flex-direction: column;
min-height: 30vh;
max-height: 80vh;
- max-width: calc(100vw - 1em);
+ max-width: calc(100vw - 2em);
+ width: 960px;
.content {
flex: 1;
diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs
index a91aa4bc7..6373392e4 100644
--- a/parity/cli/mod.rs
+++ b/parity/cli/mod.rs
@@ -238,7 +238,7 @@ usage! {
or |c: &Config| otry!(c.footprint).tracing.clone(),
flag_pruning: String = "auto",
or |c: &Config| otry!(c.footprint).pruning.clone(),
- flag_pruning_history: u64 = 1200u64,
+ flag_pruning_history: u64 = 64u64,
or |c: &Config| otry!(c.footprint).pruning_history.clone(),
flag_cache_size_db: u32 = 64u32,
or |c: &Config| otry!(c.footprint).cache_size_db.clone(),
diff --git a/parity/cli/usage.txt b/parity/cli/usage.txt
index e2e79dd59..671f972d5 100644
--- a/parity/cli/usage.txt
+++ b/parity/cli/usage.txt
@@ -59,7 +59,7 @@ Operating Options:
--chain CHAIN Specify the blockchain type. CHAIN may be either a
JSON chain specification file or olympic, frontier,
homestead, mainnet, morden, ropsten, classic, expanse,
- testnet or dev (default: {flag_chain}).
+ testnet, kovan or dev (default: {flag_chain}).
-d --base-path PATH Specify the base data storage path.
(default: {flag_base_path}).
--db-path PATH Specify the database directory path
@@ -335,8 +335,7 @@ Legacy Options:
to be the same as Geth's. Overrides the --ipc-path
and --ipcpath options. Alters RPCs to reflect Geth
bugs. Includes the personal_ RPC by default.
- --testnet Geth-compatible testnet mode. Equivalent to --chain
- testnet --keys-path $HOME/parity/testnet-keys.
+ --testnet Testnet mode. Equivalent to --chain testnet.
Overrides the --keys-path option.
--import-geth-keys Attempt to import keys from Geth client.
--datadir PATH Equivalent to --base-path PATH.
diff --git a/parity/configuration.rs b/parity/configuration.rs
index b8c23341d..00af1d079 100644
--- a/parity/configuration.rs
+++ b/parity/configuration.rs
@@ -412,7 +412,7 @@ impl Configuration {
fn chain(&self) -> String {
if self.args.flag_testnet {
- "ropsten".to_owned()
+ "testnet".to_owned()
} else {
self.args.flag_chain.clone()
}
@@ -759,8 +759,8 @@ impl Configuration {
let dapps_path = replace_home(&data_path, &self.args.flag_dapps_path);
let ui_path = replace_home(&data_path, &self.args.flag_ui_path);
- if self.args.flag_geth && !cfg!(windows) {
- let geth_root = if self.args.flag_testnet { path::ethereum::test() } else { path::ethereum::default() };
+ if self.args.flag_geth && !cfg!(windows) {
+ let geth_root = if self.chain() == "testnet".to_owned() { path::ethereum::test() } else { path::ethereum::default() };
::std::fs::create_dir_all(geth_root.as_path()).unwrap_or_else(
|e| warn!("Failed to create '{}' for geth mode: {}", &geth_root.to_str().unwrap(), e));
}
@@ -943,7 +943,7 @@ mod tests {
file_path: Some("blockchain.json".into()),
format: Default::default(),
pruning: Default::default(),
- pruning_history: 1200,
+ pruning_history: 64,
compaction: Default::default(),
wal: true,
tracing: Default::default(),
@@ -965,7 +965,7 @@ mod tests {
dirs: Default::default(),
file_path: Some("blockchain.json".into()),
pruning: Default::default(),
- pruning_history: 1200,
+ pruning_history: 64,
format: Default::default(),
compaction: Default::default(),
wal: true,
@@ -987,7 +987,7 @@ mod tests {
dirs: Default::default(),
file_path: Some("state.json".into()),
pruning: Default::default(),
- pruning_history: 1200,
+ pruning_history: 64,
format: Default::default(),
compaction: Default::default(),
wal: true,
@@ -1011,7 +1011,7 @@ mod tests {
dirs: Default::default(),
file_path: Some("blockchain.json".into()),
pruning: Default::default(),
- pruning_history: 1200,
+ pruning_history: 64,
format: Some(DataFormat::Hex),
compaction: Default::default(),
wal: true,
@@ -1046,7 +1046,7 @@ mod tests {
dirs: Default::default(),
spec: Default::default(),
pruning: Default::default(),
- pruning_history: 1200,
+ pruning_history: 64,
daemon: None,
logger_config: Default::default(),
miner_options: Default::default(),
@@ -1127,7 +1127,7 @@ mod tests {
// then
assert_eq!(conf.network_settings(), NetworkSettings {
name: "testname".to_owned(),
- chain: "ropsten".to_owned(),
+ chain: "testnet".to_owned(),
network_port: 30303,
rpc_enabled: true,
rpc_interface: "local".to_owned(),
diff --git a/parity/params.rs b/parity/params.rs
index 7ef806fb8..39faea375 100644
--- a/parity/params.rs
+++ b/parity/params.rs
@@ -26,9 +26,10 @@ use user_defaults::UserDefaults;
#[derive(Debug, PartialEq)]
pub enum SpecType {
- Mainnet,
+ Foundation,
Morden,
Ropsten,
+ Kovan,
Olympic,
Classic,
Expanse,
@@ -38,7 +39,7 @@ pub enum SpecType {
impl Default for SpecType {
fn default() -> Self {
- SpecType::Mainnet
+ SpecType::Foundation
}
}
@@ -47,10 +48,11 @@ impl str::FromStr for SpecType {
fn from_str(s: &str) -> Result {
let spec = match s {
- "frontier" | "homestead" | "mainnet" => SpecType::Mainnet,
+ "foundation" | "frontier" | "homestead" | "mainnet" => SpecType::Foundation,
"frontier-dogmatic" | "homestead-dogmatic" | "classic" => SpecType::Classic,
"morden" | "classic-testnet" => SpecType::Morden,
- "ropsten" | "testnet" => SpecType::Ropsten,
+ "ropsten" => SpecType::Ropsten,
+ "kovan" | "testnet" => SpecType::Kovan,
"olympic" => SpecType::Olympic,
"expanse" => SpecType::Expanse,
"dev" => SpecType::Dev,
@@ -63,12 +65,13 @@ impl str::FromStr for SpecType {
impl fmt::Display for SpecType {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.write_str(match *self {
- SpecType::Mainnet => "homestead",
+ SpecType::Foundation => "foundation",
SpecType::Morden => "morden",
SpecType::Ropsten => "ropsten",
SpecType::Olympic => "olympic",
SpecType::Classic => "classic",
SpecType::Expanse => "expanse",
+ SpecType::Kovan => "kovan",
SpecType::Dev => "dev",
SpecType::Custom(ref custom) => custom,
})
@@ -78,12 +81,13 @@ impl fmt::Display for SpecType {
impl SpecType {
pub fn spec(&self) -> Result {
match *self {
- SpecType::Mainnet => Ok(ethereum::new_frontier()),
+ SpecType::Foundation => Ok(ethereum::new_foundation()),
SpecType::Morden => Ok(ethereum::new_morden()),
SpecType::Ropsten => Ok(ethereum::new_ropsten()),
SpecType::Olympic => Ok(ethereum::new_olympic()),
SpecType::Classic => Ok(ethereum::new_classic()),
SpecType::Expanse => Ok(ethereum::new_expanse()),
+ SpecType::Kovan => Ok(ethereum::new_kovan()),
SpecType::Dev => Ok(Spec::new_instant()),
SpecType::Custom(ref filename) => {
let file = fs::File::open(filename).map_err(|_| "Could not load specification file.")?;
@@ -315,10 +319,12 @@ mod tests {
#[test]
fn test_spec_type_parsing() {
- assert_eq!(SpecType::Mainnet, "frontier".parse().unwrap());
- assert_eq!(SpecType::Mainnet, "homestead".parse().unwrap());
- assert_eq!(SpecType::Mainnet, "mainnet".parse().unwrap());
- assert_eq!(SpecType::Ropsten, "testnet".parse().unwrap());
+ assert_eq!(SpecType::Foundation, "frontier".parse().unwrap());
+ assert_eq!(SpecType::Foundation, "homestead".parse().unwrap());
+ assert_eq!(SpecType::Foundation, "mainnet".parse().unwrap());
+ assert_eq!(SpecType::Foundation, "foundation".parse().unwrap());
+ assert_eq!(SpecType::Kovan, "testnet".parse().unwrap());
+ assert_eq!(SpecType::Kovan, "kovan".parse().unwrap());
assert_eq!(SpecType::Morden, "morden".parse().unwrap());
assert_eq!(SpecType::Ropsten, "ropsten".parse().unwrap());
assert_eq!(SpecType::Olympic, "olympic".parse().unwrap());
@@ -328,17 +334,18 @@ mod tests {
#[test]
fn test_spec_type_default() {
- assert_eq!(SpecType::Mainnet, SpecType::default());
+ assert_eq!(SpecType::Foundation, SpecType::default());
}
#[test]
fn test_spec_type_display() {
- assert_eq!(format!("{}", SpecType::Mainnet), "homestead");
+ assert_eq!(format!("{}", SpecType::Foundation), "foundation");
assert_eq!(format!("{}", SpecType::Ropsten), "ropsten");
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::Kovan), "kovan");
assert_eq!(format!("{}", SpecType::Dev), "dev");
assert_eq!(format!("{}", SpecType::Custom("foo/bar".into())), "foo/bar");
}
diff --git a/scripts/docker-build.sh b/scripts/docker-build.sh
index bc6185d15..9c874eac6 100644
--- a/scripts/docker-build.sh
+++ b/scripts/docker-build.sh
@@ -1,3 +1,4 @@
#!/bin/bash
+cd docker/hub
docker build --no-cache=true --tag ethcore/parity:$1 .
docker push ethcore/parity:$1
|