diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-01-17 21:27:39 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-01-17 21:28:16 +0800 |
commit | 83f77a2d561780c97790fe44a3d34a3c7e847273 (patch) | |
tree | 178ae3ac319ab14c4124161dce2a578f847c4259 | |
parent | cdac2d210e2a43c35cbcc2f046010e972640c89c (diff) | |
download | dexon-sol-tools-83f77a2d561780c97790fe44a3d34a3c7e847273.tar dexon-sol-tools-83f77a2d561780c97790fe44a3d34a3c7e847273.tar.gz dexon-sol-tools-83f77a2d561780c97790fe44a3d34a3c7e847273.tar.bz2 dexon-sol-tools-83f77a2d561780c97790fe44a3d34a3c7e847273.tar.lz dexon-sol-tools-83f77a2d561780c97790fe44a3d34a3c7e847273.tar.xz dexon-sol-tools-83f77a2d561780c97790fe44a3d34a3c7e847273.tar.zst dexon-sol-tools-83f77a2d561780c97790fe44a3d34a3c7e847273.zip |
Fix a bug when a custom Geth tracer didn't return stack entries for DELEGATECALL
-rw-r--r-- | packages/sol-tracing-utils/CHANGELOG.json | 9 | ||||
-rw-r--r-- | packages/sol-tracing-utils/src/trace_info_subprovider.ts | 2 |
2 files changed, 10 insertions, 1 deletions
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,5 +1,14 @@ [ { + "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 }); }, |