support specifying gas limit when deploying client side

This commit is contained in:
Iuri Matias 2017-02-22 06:51:02 -05:00
parent 8348f0a224
commit fb4681aa9c
2 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -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);