diff --git a/lib/modules/gasEstimator/index.js b/lib/modules/gasEstimator/index.js index 8cde13193..65d7c956f 100644 --- a/lib/modules/gasEstimator/index.js +++ b/lib/modules/gasEstimator/index.js @@ -51,7 +51,9 @@ class GasEstimator { } else if (_.isEqual(variance[0], variance[1]) && _.isEqual(variance[1], variance[2])) { gasMap[name] = variance[0]; } else { - gasMap[name] = 'infinite'; + let sum = _.reduce(variance, function(memo, num) { return memo + num; }, 0); + let average = sum / variance.length; + gasMap[name] = average; } return gasCb(null, name, abiMethod.type); });