Fix a bug with OpCode gas costs being incorrect or NaN
This commit is contained in:
@@ -5,6 +5,10 @@
|
||||
{
|
||||
"note": "Fix a bug when `TruffleArtifactAdapter` wasn't correctly parsing solc config in the pre 5.0 version of trufle",
|
||||
"pr": "todo"
|
||||
},
|
||||
{
|
||||
"note": "Fix a bug when `opCodes` gas costs were incorrect or `NaN`",
|
||||
"pr": "todo"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@@ -138,12 +138,12 @@ export const utils = {
|
||||
};
|
||||
if (structLogs[0].depth === 1) {
|
||||
// Geth uses 1-indexed depth counter whilst ganache starts from 0
|
||||
normalizedStructLogs = _.map(structLogs, reduceDepthBy1);
|
||||
normalizedStructLogs = _.map(structLogs, normalizeCallCost);
|
||||
normalizedStructLogs = _.map(structLogs, normalizeStaticCallCost);
|
||||
normalizedStructLogs = _.map(normalizedStructLogs, reduceDepthBy1);
|
||||
normalizedStructLogs = _.map(normalizedStructLogs, normalizeCallCost);
|
||||
normalizedStructLogs = _.map(normalizedStructLogs, normalizeStaticCallCost);
|
||||
} else {
|
||||
// Ganache shifts opcodes gas costs so we need to unshift them
|
||||
normalizedStructLogs = _.map(structLogs, shiftGasCosts1Left);
|
||||
normalizedStructLogs = _.map(normalizedStructLogs, shiftGasCosts1Left);
|
||||
}
|
||||
return normalizedStructLogs;
|
||||
},
|
||||
|
Reference in New Issue
Block a user