diff options
author | Gav Wood <i@gavwood.com> | 2015-01-26 05:43:36 +0800 |
---|---|---|
committer | Gav Wood <i@gavwood.com> | 2015-01-26 05:43:36 +0800 |
commit | d223ac0379c4c1f8c209e777ec9ed63384590157 (patch) | |
tree | dbce42e40636c8bd82fe9cf8d744c65e4f19e5f8 /lib/contract.js | |
parent | 113a3809ab5e92cd0d60a02a5752b260a9ab3331 (diff) | |
download | go-tangerine-d223ac0379c4c1f8c209e777ec9ed63384590157.tar go-tangerine-d223ac0379c4c1f8c209e777ec9ed63384590157.tar.gz go-tangerine-d223ac0379c4c1f8c209e777ec9ed63384590157.tar.bz2 go-tangerine-d223ac0379c4c1f8c209e777ec9ed63384590157.tar.lz go-tangerine-d223ac0379c4c1f8c209e777ec9ed63384590157.tar.xz go-tangerine-d223ac0379c4c1f8c209e777ec9ed63384590157.tar.zst go-tangerine-d223ac0379c4c1f8c209e777ec9ed63384590157.zip |
Additional work on the JS stuff to make it more similar to Solidity.
Diffstat (limited to 'lib/contract.js')
-rw-r--r-- | lib/contract.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/contract.js b/lib/contract.js index 418f87df7..95cc7bbd6 100644 --- a/lib/contract.js +++ b/lib/contract.js @@ -75,6 +75,15 @@ var contract = function (address, desc) { return result; }; + result._options = {}; + ['gas', 'gasPrice', 'value', 'from'].forEach(function(p) { + result[p] = function (v) { + result._options[p] = v; + return result; + }; + }); + + desc.forEach(function (method) { var displayName = abi.methodDisplayName(method.name); |