diff --git a/lib/modules/gasEstimator/index.js b/lib/modules/gasEstimator/index.js index dee093de..62ff637c 100644 --- a/lib/modules/gasEstimator/index.js +++ b/lib/modules/gasEstimator/index.js @@ -25,21 +25,18 @@ class GasEstimator { if (abiMethod.type === "constructor") { // already provided for us gasMap['constructor'] = contract.gasEstimates.creation.totalCost.toString(); - gasCb(null); + gasCb(); } else if (abiMethod.type === "fallback") { gasMap['fallback'] = contract.gasEstimates.external[""].toString(); - gasCb(null); + gasCb(); } else if (abiMethod.inputs === null || abiMethod.inputs === undefined || abiMethod.inputs.length === 0) { // just run it and register it contractObj.methods[name] .apply(contractObj.methods[name], []) .estimateGas((err, gasAmount) => { - if (err) { - return gasCb(err); - } else { - gasMap[name] = gasAmount; - gasCb(null, gasAmount, name); - } + if (err) return gasCb(err); + gasMap[name] = gasAmount; + gasCb(); }); } else { // async concatenate all the fuzz values and their gas cost outputs and check for equality