From fb4681aa9c718b792e4d1afdfcf1274f9a6ea6f9 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Wed, 22 Feb 2017 06:51:02 -0500 Subject: [PATCH] support specifying gas limit when deploying client side --- js/build/embark.bundle.js | 6 +++--- js/embark.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/js/build/embark.bundle.js b/js/build/embark.bundle.js index 095feb62..eed9d3d4 100644 --- a/js/build/embark.bundle.js +++ b/js/build/embark.bundle.js @@ -150,17 +150,17 @@ var EmbarkJS = }); }; - EmbarkJS.Contract.prototype.deploy = function(args) { + EmbarkJS.Contract.prototype.deploy = function(args, _options) { var self = this; var contractParams; + var options = _options || {}; contractParams = args || []; contractParams.push({ from: this.web3.eth.accounts[0], data: this.code, - gas: 500000, - gasPrice: 10000000000000 + gas: options.gas || 800000 }); var contractObject = this.web3.eth.contract(this.abi); diff --git a/js/embark.js b/js/embark.js index 725b588d..93b7e39f 100644 --- a/js/embark.js +++ b/js/embark.js @@ -103,17 +103,17 @@ EmbarkJS.Contract = function(options) { }); }; -EmbarkJS.Contract.prototype.deploy = function(args) { +EmbarkJS.Contract.prototype.deploy = function(args, _options) { var self = this; var contractParams; + var options = _options || {}; contractParams = args || []; contractParams.push({ from: this.web3.eth.accounts[0], data: this.code, - gas: 500000, - gasPrice: 10000000000000 + gas: options.gas || 800000 }); var contractObject = this.web3.eth.contract(this.abi);