mirror of https://github.com/embarklabs/embark.git
set the default limit if the contract deploy option is false
This commit is contained in:
parent
bf509e8b27
commit
727e2d0923
|
@ -44,7 +44,12 @@ ContractsManager.prototype.build = function() {
|
|||
contract.abiDefinition = compiledContract.abiDefinition;
|
||||
|
||||
if (this.contractsConfig.gas === 'auto') {
|
||||
var maxGas = Math.max(contract.gasEstimates.creation[0], contract.gasEstimates.creation[1], 500000);
|
||||
var maxGas;
|
||||
if (contract.deploy) {
|
||||
maxGas = Math.max(contract.gasEstimates.creation[0], contract.gasEstimates.creation[1], 500000);
|
||||
} else {
|
||||
maxGas = 500000;
|
||||
}
|
||||
var adjustedGas = Math.round(maxGas * 1.01);
|
||||
contract.gas = adjustedGas;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue