diff options
Diffstat (limited to 'lib/contract.js')
-rw-r--r-- | lib/contract.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/contract.js b/lib/contract.js index 4cb202255..eb7fbf018 100644 --- a/lib/contract.js +++ b/lib/contract.js @@ -57,8 +57,10 @@ var contract = function (address, desc) { transact: function (extra) { extra = extra || {}; extra.to = address; - extra.data = parsed; - return web3.eth.transact(extra).then(onSuccess); + return abi.methodSignature(desc, method.name).then(function (signature) { + extra.data = signature.slice(0, 2 + ETH_METHOD_SIGNATURE_LENGTH * 2) + parsed; + return web3.eth.transact(extra).then(onSuccess); + }); } }; }; |