diff options
author | Gav Wood <i@gavwood.com> | 2015-01-12 01:15:35 +0800 |
---|---|---|
committer | Gav Wood <i@gavwood.com> | 2015-01-12 01:15:35 +0800 |
commit | 5582901ca5835a32f907a12ded2a4e3492f8b4e3 (patch) | |
tree | fd99c182a5c271b7c3c120afde4ddfd439d2dd51 /lib | |
parent | ded221fba2cc21e1037a1130d9d142e657a52e89 (diff) | |
download | dexon-5582901ca5835a32f907a12ded2a4e3492f8b4e3.tar dexon-5582901ca5835a32f907a12ded2a4e3492f8b4e3.tar.gz dexon-5582901ca5835a32f907a12ded2a4e3492f8b4e3.tar.bz2 dexon-5582901ca5835a32f907a12ded2a4e3492f8b4e3.tar.lz dexon-5582901ca5835a32f907a12ded2a4e3492f8b4e3.tar.xz dexon-5582901ca5835a32f907a12ded2a4e3492f8b4e3.tar.zst dexon-5582901ca5835a32f907a12ded2a4e3492f8b4e3.zip |
Various fixes to ethereum.js and client web API stuff.
Diffstat (limited to 'lib')
-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); + }); } }; }; |