From 4ca61d115a06b0fcd5a712e99f0e1ab77feb3c0d Mon Sep 17 00:00:00 2001 From: Eswara Sai Date: Fri, 22 Feb 2019 16:45:38 +0530 Subject: [PATCH 1/2] Upgraded ethereumjs-util to fix sign message issue --- .gitignore | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c664a6e412..759e4de4c6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.idea .vscode build node_modules diff --git a/package.json b/package.json index 69c0b6b90c..63fda23923 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "csjs-inject": "^1.0.1", "csslint": "^1.0.2", "deep-equal": "^1.0.1", - "ethereumjs-util": "^5.1.2", + "ethereumjs-util": "^6.1.0", "execr": "^1.0.1", "exorcist": "^0.4.0", "fast-async": "6.3.1", From 43858c2d03cbaf75d8851dd5bb5e3b58d0418481 Mon Sep 17 00:00:00 2001 From: Eswara Sai Date: Fri, 15 Mar 2019 12:17:41 +0530 Subject: [PATCH 2/2] Refactored ethutil.sha3 to ethutil.keccak --- src/app/tabs/runTab/model/recorder.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/tabs/runTab/model/recorder.js b/src/app/tabs/runTab/model/recorder.js index 8f1e994438..588f24f9bc 100644 --- a/src/app/tabs/runTab/model/recorder.js +++ b/src/app/tabs/runTab/model/recorder.js @@ -31,8 +31,8 @@ class Recorder { var record = { value, parameters: payLoad.funArgs } if (!to) { var abi = payLoad.contractABI - var sha3 = ethutil.bufferToHex(ethutil.sha3(abi)) - record.abi = sha3 + var keccak = ethutil.bufferToHex(ethutil.keccak(abi)) + record.abi = keccak record.contractName = payLoad.contractName record.bytecode = payLoad.contractBytecode record.linkReferences = payLoad.linkReferences @@ -43,9 +43,9 @@ class Recorder { } } } - self.data._abis[sha3] = abi + self.data._abis[keccak] = abi - this.data._contractABIReferences[timestamp] = sha3 + this.data._contractABIReferences[timestamp] = keccak } else { var creationTimestamp = this.data._createdContracts[to] record.to = `created{${creationTimestamp}}`