From 0538c11576a020a0e7fe19652398547fdad4b84b Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Fri, 9 Jan 2015 12:55:04 +0100 Subject: sha3 method signature --- lib/contract.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/contract.js') diff --git a/lib/contract.js b/lib/contract.js index b10339003..1a03849bf 100644 --- a/lib/contract.js +++ b/lib/contract.js @@ -46,8 +46,10 @@ var contract = function (address, desc) { call: function (extra) { extra = extra || {}; extra.to = address; - extra.data = parsed; - return web3.eth.call(extra).then(onSuccess); + return abi.methodSignature(desc, method.name).then(function (signature) { + extra.data = signature.slice(0, 10) + parsed; + return web3.eth.call(extra).then(onSuccess); + }); }, transact: function (extra) { extra = extra || {}; -- cgit v1.2.3