aboutsummaryrefslogtreecommitdiffstats
path: root/lib/contract.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/contract.js')
-rw-r--r--lib/contract.js9
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);