aboutsummaryrefslogtreecommitdiffstats
path: root/lib/contract.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/contract.js')
-rw-r--r--lib/contract.js6
1 files changed, 4 insertions, 2 deletions
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 || {};