Skip to content

Commit fb4681a

Browse files
committed
support specifying gas limit when deploying client side
1 parent 8348f0a commit fb4681a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

js/build/embark.bundle.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,17 +150,17 @@ var EmbarkJS =
150150
});
151151
};
152152

153-
EmbarkJS.Contract.prototype.deploy = function(args) {
153+
EmbarkJS.Contract.prototype.deploy = function(args, _options) {
154154
var self = this;
155155
var contractParams;
156+
var options = _options || {};
156157

157158
contractParams = args || [];
158159

159160
contractParams.push({
160161
from: this.web3.eth.accounts[0],
161162
data: this.code,
162-
gas: 500000,
163-
gasPrice: 10000000000000
163+
gas: options.gas || 800000
164164
});
165165

166166
var contractObject = this.web3.eth.contract(this.abi);

js/embark.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,17 @@ EmbarkJS.Contract = function(options) {
103103
});
104104
};
105105

106-
EmbarkJS.Contract.prototype.deploy = function(args) {
106+
EmbarkJS.Contract.prototype.deploy = function(args, _options) {
107107
var self = this;
108108
var contractParams;
109+
var options = _options || {};
109110

110111
contractParams = args || [];
111112

112113
contractParams.push({
113114
from: this.web3.eth.accounts[0],
114115
data: this.code,
115-
gas: 500000,
116-
gasPrice: 10000000000000
116+
gas: options.gas || 800000
117117
});
118118

119119
var contractObject = this.web3.eth.contract(this.abi);

0 commit comments

Comments
 (0)