From 83f77a2d561780c97790fe44a3d34a3c7e847273 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 17 Jan 2019 14:27:39 +0100 Subject: Fix a bug when a custom Geth tracer didn't return stack entries for DELEGATECALL --- packages/sol-tracing-utils/CHANGELOG.json | 9 +++++++++ packages/sol-tracing-utils/src/trace_info_subprovider.ts | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'packages/sol-tracing-utils') diff --git a/packages/sol-tracing-utils/CHANGELOG.json b/packages/sol-tracing-utils/CHANGELOG.json index b470d3e87..9ee298e22 100644 --- a/packages/sol-tracing-utils/CHANGELOG.json +++ b/packages/sol-tracing-utils/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "version": "4.0.1", + "changes": [ + { + "note": "Fix a bug when a custom Geth tracer didn't return stack entries for `DELEGATECALL`", + "pr": "TODO" + } + ] + }, { "version": "4.0.0", "changes": [ diff --git a/packages/sol-tracing-utils/src/trace_info_subprovider.ts b/packages/sol-tracing-utils/src/trace_info_subprovider.ts index b75fc7bf7..de42e1862 100644 --- a/packages/sol-tracing-utils/src/trace_info_subprovider.ts +++ b/packages/sol-tracing-utils/src/trace_info_subprovider.ts @@ -31,7 +31,7 @@ export abstract class TraceInfoSubprovider extends TraceCollectionSubprovider { const depth = 0 | log.getDepth(); const gasCost = 0 | log.getCost(); const gas = 0 | log.getGas(); - const isCall = opn == 0xf1 || opn == 0xf2 || opn == 0xf4 || opn == 0xf5; + const isCall = opn == 0xf1 || opn == 0xf2 || opn == 0xf4 || opn == 0xf5 || opn == 0xfa; const stack = isCall ? ['0x'+log.stack.peek(1).toString(16), null] : null; this.data.push({ pc, gasCost, depth, op, stack, gas }); }, -- cgit