mirror of https://github.com/embarklabs/embark.git
more patchy mcpatchface
Signed-off-by: VoR0220 <catalanor0220@gmail.com>
This commit is contained in:
parent
3ede75ce50
commit
41f77793f4
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue