From d25a20b274a19f158b0b51ce56d844412ad1f8ea Mon Sep 17 00:00:00 2001 From: Arkadiy Paronyan Date: Fri, 10 Mar 2017 10:08:04 +0100 Subject: [PATCH] Backporting to beta (#4840) * Fixes to the Registry dapp (#4838) * Fix wrong ABI methods * Fix * v1.6.1 --- Cargo.lock | 50 ++++++++++++------------ Cargo.toml | 2 +- js/src/dapps/registry/Lookup/actions.js | 17 +++++--- js/src/dapps/registry/Records/actions.js | 5 ++- js/src/dapps/registry/ui/image.js | 2 +- mac/Parity.pkgproj | 2 +- nsis/installer.nsi | 2 +- util/Cargo.toml | 2 +- 8 files changed, 45 insertions(+), 37 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d700d39954f..4cde59e503e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ [root] name = "parity" -version = "1.6.0" +version = "1.6.1" dependencies = [ "ansi_term 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "app_dirs 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -23,7 +23,7 @@ dependencies = [ "ethcore-secretstore 1.0.0", "ethcore-signer 1.6.0", "ethcore-stratum 1.6.0", - "ethcore-util 1.6.0", + "ethcore-util 1.6.1", "ethsync 1.6.0", "evmbin 0.1.0", "fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -394,7 +394,7 @@ dependencies = [ "ethcore-ipc-codegen 1.6.0", "ethcore-ipc-nano 1.6.0", "ethcore-stratum 1.6.0", - "ethcore-util 1.6.0", + "ethcore-util 1.6.1", "ethjson 0.1.0", "ethkey 0.2.0", "ethstore 0.1.0", @@ -443,7 +443,7 @@ dependencies = [ "env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore-devtools 1.6.0", "ethcore-rpc 1.6.0", - "ethcore-util 1.6.0", + "ethcore-util 1.6.1", "fetch 0.1.0", "futures 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.10.0-a.0 (git+https://github.com/ethcore/hyper)", @@ -491,7 +491,7 @@ name = "ethcore-ipc" version = "1.6.0" dependencies = [ "ethcore-devtools 1.6.0", - "ethcore-util 1.6.0", + "ethcore-util 1.6.1", "nanomsg 0.5.1 (git+https://github.com/ethcore/nanomsg.rs.git)", "semver 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -538,7 +538,7 @@ dependencies = [ "ethcore-ipc 1.6.0", "ethcore-ipc-codegen 1.6.0", "ethcore-ipc-nano 1.6.0", - "ethcore-util 1.6.0", + "ethcore-util 1.6.1", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "nanomsg 0.5.1 (git+https://github.com/ethcore/nanomsg.rs.git)", "semver 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -553,7 +553,7 @@ dependencies = [ "ethcore-ipc 1.6.0", "ethcore-ipc-codegen 1.6.0", "ethcore-network 1.6.0", - "ethcore-util 1.6.0", + "ethcore-util 1.6.1", "futures 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -569,7 +569,7 @@ name = "ethcore-logger" version = "1.6.0" dependencies = [ "env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "ethcore-util 1.6.0", + "ethcore-util 1.6.1", "isatty 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -585,7 +585,7 @@ dependencies = [ "bytes 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore-devtools 1.6.0", "ethcore-io 1.6.0", - "ethcore-util 1.6.0", + "ethcore-util 1.6.1", "ethcrypto 0.1.0", "ethkey 0.2.0", "igd 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -613,7 +613,7 @@ dependencies = [ "ethcore-io 1.6.0", "ethcore-ipc 1.6.0", "ethcore-light 1.6.0", - "ethcore-util 1.6.0", + "ethcore-util 1.6.1", "ethcrypto 0.1.0", "ethjson 0.1.0", "ethkey 0.2.0", @@ -648,7 +648,7 @@ dependencies = [ "ethcore-ipc 1.6.0", "ethcore-ipc-codegen 1.6.0", "ethcore-ipc-nano 1.6.0", - "ethcore-util 1.6.0", + "ethcore-util 1.6.1", "ethcrypto 0.1.0", "ethkey 0.2.0", "hyper 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -666,7 +666,7 @@ dependencies = [ "ethcore-devtools 1.6.0", "ethcore-io 1.6.0", "ethcore-rpc 1.6.0", - "ethcore-util 1.6.0", + "ethcore-util 1.6.1", "jsonrpc-core 6.0.0 (git+https://github.com/ethcore/jsonrpc.git)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -685,7 +685,7 @@ dependencies = [ "ethcore-ipc 1.6.0", "ethcore-ipc-codegen 1.6.0", "ethcore-ipc-nano 1.6.0", - "ethcore-util 1.6.0", + "ethcore-util 1.6.1", "futures 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 6.0.0 (git+https://github.com/ethcore/jsonrpc.git)", "jsonrpc-macros 6.0.0 (git+https://github.com/ethcore/jsonrpc.git)", @@ -699,7 +699,7 @@ dependencies = [ [[package]] name = "ethcore-util" -version = "1.6.0" +version = "1.6.1" dependencies = [ "ansi_term 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "arrayvec 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", @@ -748,7 +748,7 @@ dependencies = [ name = "ethjson" version = "0.1.0" dependencies = [ - "ethcore-util 1.6.0", + "ethcore-util 1.6.1", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -776,7 +776,7 @@ version = "0.1.0" dependencies = [ "docopt 0.6.80 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore-devtools 1.6.0", - "ethcore-util 1.6.0", + "ethcore-util 1.6.1", "ethcrypto 0.1.0", "ethkey 0.2.0", "itertools 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -809,7 +809,7 @@ dependencies = [ "ethcore-ipc-nano 1.6.0", "ethcore-light 1.6.0", "ethcore-network 1.6.0", - "ethcore-util 1.6.0", + "ethcore-util 1.6.1", "ethkey 0.2.0", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -826,7 +826,7 @@ version = "0.1.0" dependencies = [ "docopt 0.6.80 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore 1.6.0", - "ethcore-util 1.6.0", + "ethcore-util 1.6.1", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1054,7 +1054,7 @@ version = "1.6.0" dependencies = [ "ethcore-ipc 1.6.0", "ethcore-ipc-codegen 1.6.0", - "ethcore-util 1.6.0", + "ethcore-util 1.6.1", "semver 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1621,7 +1621,7 @@ name = "parity-hash-fetch" version = "1.6.0" dependencies = [ "ethabi 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ethcore-util 1.6.0", + "ethcore-util 1.6.1", "fetch 0.1.0", "futures 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1638,7 +1638,7 @@ version = "1.6.0" dependencies = [ "cid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore 1.6.0", - "ethcore-util 1.6.0", + "ethcore-util 1.6.1", "hyper 0.10.0-a.0 (git+https://github.com/ethcore/hyper)", "jsonrpc-http-server 6.0.0 (git+https://github.com/ethcore/jsonrpc.git)", "mime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1652,7 +1652,7 @@ version = "0.1.0" dependencies = [ "ethcore 1.6.0", "ethcore-io 1.6.0", - "ethcore-util 1.6.0", + "ethcore-util 1.6.1", "ethkey 0.2.0", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "rlp 0.1.0", @@ -1675,7 +1675,7 @@ version = "1.4.0" dependencies = [ "ethcore-rpc 1.6.0", "ethcore-signer 1.6.0", - "ethcore-util 1.6.0", + "ethcore-util 1.6.1", "futures 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "jsonrpc-core 6.0.0 (git+https://github.com/ethcore/jsonrpc.git)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1719,7 +1719,7 @@ dependencies = [ "ethcore 1.6.0", "ethcore-ipc 1.6.0", "ethcore-ipc-codegen 1.6.0", - "ethcore-util 1.6.0", + "ethcore-util 1.6.1", "ethsync 1.6.0", "ipc-common-types 1.6.0", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1993,7 +1993,7 @@ version = "1.4.0" dependencies = [ "ethcore-bigint 0.1.2", "ethcore-rpc 1.6.0", - "ethcore-util 1.6.0", + "ethcore-util 1.6.1", "futures 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "parity-rpc-client 1.4.0", "rpassword 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 28af3c1f29f..c2dcf258d12 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Parity Ethereum client" name = "parity" -version = "1.6.0" +version = "1.6.1" license = "GPL-3.0" authors = ["Parity Technologies "] diff --git a/js/src/dapps/registry/Lookup/actions.js b/js/src/dapps/registry/Lookup/actions.js index 6f80fac0d03..514039272bf 100644 --- a/js/src/dapps/registry/Lookup/actions.js +++ b/js/src/dapps/registry/Lookup/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 { sha3 } from '../parity.js'; +import { api, sha3 } from '../parity.js'; import { getOwner } from '../util/registry'; export const clear = () => ({ type: 'lookup clear' }); @@ -34,14 +34,21 @@ export const lookup = (name, key) => (dispatch, getState) => { return; } - const getAddress = contract.functions - .find((f) => f.name === 'getAddress'); + const method = key === 'A' + ? contract.instance.getAddress + : contract.instance.getData; name = name.toLowerCase(); dispatch(lookupStart(name, key)); - getAddress.call({}, [ sha3.text(name), key ]) - .then((address) => dispatch(success('lookup', address))) + method.call({}, [ sha3.text(name), key ]) + .then((result) => { + if (key !== 'A') { + result = api.util.bytesToHex(result); + } + + dispatch(success('lookup', result)); + }) .catch((err) => { console.error(`could not lookup ${key} for ${name}`); if (err) { diff --git a/js/src/dapps/registry/Records/actions.js b/js/src/dapps/registry/Records/actions.js index 11c2ec40553..9f0d1beff83 100644 --- a/js/src/dapps/registry/Records/actions.js +++ b/js/src/dapps/registry/Records/actions.js @@ -46,8 +46,9 @@ export const update = (name, key, value) => (dispatch, getState) => { throw new Error(`you are not the owner of "${name}"`); } - const fnName = key === 'A' ? 'setAddress' : 'set'; - const method = contract.instance[fnName]; + const method = key === 'A' + ? contract.instance.setAddress + : contract.instance.setData || contract.instance.set; const options = { from: account.address diff --git a/js/src/dapps/registry/ui/image.js b/js/src/dapps/registry/ui/image.js index 1aee2145763..3f0a90abe76 100644 --- a/js/src/dapps/registry/ui/image.js +++ b/js/src/dapps/registry/ui/image.js @@ -34,7 +34,7 @@ export default (address) => { return ( { diff --git a/mac/Parity.pkgproj b/mac/Parity.pkgproj index caecc7c0d25..02a9d9a277c 100755 --- a/mac/Parity.pkgproj +++ b/mac/Parity.pkgproj @@ -462,7 +462,7 @@ OVERWRITE_PERMISSIONS VERSION - 1.6.0 + 1.6.1 UUID 2DCD5B81-7BAF-4DA1-9251-6274B089FD36 diff --git a/nsis/installer.nsi b/nsis/installer.nsi index f407659447e..a973d47b8b7 100644 --- a/nsis/installer.nsi +++ b/nsis/installer.nsi @@ -10,7 +10,7 @@ !define DESCRIPTION "Fast, light, robust Ethereum implementation" !define VERSIONMAJOR 1 !define VERSIONMINOR 6 -!define VERSIONBUILD 0 +!define VERSIONBUILD 1 !define ARGS "--warp" !define FIRST_START_ARGS "ui --warp --mode=passive" diff --git a/util/Cargo.toml b/util/Cargo.toml index 7a195212a2a..e70921ce4de 100644 --- a/util/Cargo.toml +++ b/util/Cargo.toml @@ -3,7 +3,7 @@ description = "Ethcore utility library" homepage = "http://parity.io" license = "GPL-3.0" name = "ethcore-util" -version = "1.6.0" +version = "1.6.1" authors = ["Parity Technologies "] build = "build.rs"