diff --git a/lib/contracts.js b/lib/contracts.js index 592e2d6e0..edd6146c9 100644 --- a/lib/contracts.js +++ b/lib/contracts.js @@ -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 {