diff options
author | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-01-09 23:48:44 +0800 |
---|---|---|
committer | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-01-09 23:48:44 +0800 |
commit | 29c60c000ad81805e73477de51f4acc62acafa68 (patch) | |
tree | e223fe0dc50c347a8fa03fe9cf3795485d6295df /dist/ethereum.js | |
parent | b3eda29f41b8edecf479e1c7e766211d4ce9334f (diff) | |
parent | 92f171ec997fe478cd1e87b8f91ee127b2fb49f3 (diff) | |
download | go-tangerine-29c60c000ad81805e73477de51f4acc62acafa68.tar go-tangerine-29c60c000ad81805e73477de51f4acc62acafa68.tar.gz go-tangerine-29c60c000ad81805e73477de51f4acc62acafa68.tar.bz2 go-tangerine-29c60c000ad81805e73477de51f4acc62acafa68.tar.lz go-tangerine-29c60c000ad81805e73477de51f4acc62acafa68.tar.xz go-tangerine-29c60c000ad81805e73477de51f4acc62acafa68.tar.zst go-tangerine-29c60c000ad81805e73477de51f4acc62acafa68.zip |
Merge branch 'develop' into tests
Diffstat (limited to 'dist/ethereum.js')
-rw-r--r-- | dist/ethereum.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/dist/ethereum.js b/dist/ethereum.js index c87ebf204..30684dbf4 100644 --- a/dist/ethereum.js +++ b/dist/ethereum.js @@ -268,7 +268,7 @@ var methodSignature = function (json, name) { result += inputTypes.join(','); result += ')'; - return web3.sha3(result); + return web3.sha3(web3.fromAscii(result)); }; module.exports = { @@ -411,6 +411,9 @@ if ("build" !== 'build') {/* var abi = require('./abi'); +// method signature length in bytes +var ETH_METHOD_SIGNATURE_LENGTH = 4; + var contract = function (address, desc) { var inputParser = abi.inputParser(desc); var outputParser = abi.outputParser(desc); @@ -431,7 +434,7 @@ var contract = function (address, desc) { extra = extra || {}; extra.to = address; return abi.methodSignature(desc, method.name).then(function (signature) { - extra.data = signature.slice(0, 10) + parsed; + extra.data = signature.slice(0, 2 + ETH_METHOD_SIGNATURE_LENGTH * 2) + parsed; return web3.eth.call(extra).then(onSuccess); }); }, @@ -1101,7 +1104,8 @@ function messageHandler(data) { } } -module.exports = web3; +if (typeof(module) !== "undefined") + module.exports = web3; },{}],7:[function(require,module,exports){ /* @@ -1180,7 +1184,8 @@ Object.defineProperty(WebSocketProvider.prototype, "onmessage", { set: function(provider) { this.onMessage(provider); } }); -module.exports = WebSocketProvider; +if (typeof(module) !== "undefined") + module.exports = WebSocketProvider; },{}],"web3":[function(require,module,exports){ var web3 = require('./lib/web3'); |