aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGav Wood <i@gavwood.com>2015-01-12 01:15:35 +0800
committerGav Wood <i@gavwood.com>2015-01-12 01:15:35 +0800
commit5582901ca5835a32f907a12ded2a4e3492f8b4e3 (patch)
treefd99c182a5c271b7c3c120afde4ddfd439d2dd51 /lib
parentded221fba2cc21e1037a1130d9d142e657a52e89 (diff)
downloaddexon-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.js6
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);
+ });
}
};
};