mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 22:44:45 +00:00
support specifying gas limit when deploying client side
This commit is contained in:
parent
8348f0a224
commit
fb4681aa9c
@ -150,17 +150,17 @@ var EmbarkJS =
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
EmbarkJS.Contract.prototype.deploy = function(args) {
|
EmbarkJS.Contract.prototype.deploy = function(args, _options) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var contractParams;
|
var contractParams;
|
||||||
|
var options = _options || {};
|
||||||
|
|
||||||
contractParams = args || [];
|
contractParams = args || [];
|
||||||
|
|
||||||
contractParams.push({
|
contractParams.push({
|
||||||
from: this.web3.eth.accounts[0],
|
from: this.web3.eth.accounts[0],
|
||||||
data: this.code,
|
data: this.code,
|
||||||
gas: 500000,
|
gas: options.gas || 800000
|
||||||
gasPrice: 10000000000000
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var contractObject = this.web3.eth.contract(this.abi);
|
var contractObject = this.web3.eth.contract(this.abi);
|
||||||
|
@ -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 self = this;
|
||||||
var contractParams;
|
var contractParams;
|
||||||
|
var options = _options || {};
|
||||||
|
|
||||||
contractParams = args || [];
|
contractParams = args || [];
|
||||||
|
|
||||||
contractParams.push({
|
contractParams.push({
|
||||||
from: this.web3.eth.accounts[0],
|
from: this.web3.eth.accounts[0],
|
||||||
data: this.code,
|
data: this.code,
|
||||||
gas: 500000,
|
gas: options.gas || 800000
|
||||||
gasPrice: 10000000000000
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var contractObject = this.web3.eth.contract(this.abi);
|
var contractObject = this.web3.eth.contract(this.abi);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user