diff options
author | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-01-09 19:55:04 +0800 |
---|---|---|
committer | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-01-09 19:55:04 +0800 |
commit | 0538c11576a020a0e7fe19652398547fdad4b84b (patch) | |
tree | 48da1c79361403f9739be8014e94b68bfbf16a2c /lib/contract.js | |
parent | 807ec60e63e54f648bea47037c307b63d1bc6c04 (diff) | |
download | go-tangerine-0538c11576a020a0e7fe19652398547fdad4b84b.tar go-tangerine-0538c11576a020a0e7fe19652398547fdad4b84b.tar.gz go-tangerine-0538c11576a020a0e7fe19652398547fdad4b84b.tar.bz2 go-tangerine-0538c11576a020a0e7fe19652398547fdad4b84b.tar.lz go-tangerine-0538c11576a020a0e7fe19652398547fdad4b84b.tar.xz go-tangerine-0538c11576a020a0e7fe19652398547fdad4b84b.tar.zst go-tangerine-0538c11576a020a0e7fe19652398547fdad4b84b.zip |
sha3 method signature
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 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 || {}; |