From 658a98dbb41ee35b36daf6e21ba0742328c36846 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 23 Dec 2020 14:57:20 +0100 Subject: [PATCH] handle STATICCALL --- libs/remix-debug/src/trace/traceHelper.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/remix-debug/src/trace/traceHelper.ts b/libs/remix-debug/src/trace/traceHelper.ts index aefa8a2957..e8933762d5 100644 --- a/libs/remix-debug/src/trace/traceHelper.ts +++ b/libs/remix-debug/src/trace/traceHelper.ts @@ -15,7 +15,7 @@ export function resolveCalledAddress (vmTraceIndex, trace) { } export function isCallInstruction (step) { - return step.op === 'CALL' || step.op === 'CALLCODE' || step.op === 'CREATE' || step.op === 'DELEGATECALL' + return step.op === 'CALL' || step.op === 'STATICCALL' || step.op === 'CALLCODE' || step.op === 'CREATE' || step.op === 'DELEGATECALL' } export function isCreateInstruction (step) { @@ -54,7 +54,7 @@ export function isCallToPrecompiledContract (index, trace) { // if stack empty => this is not a precompiled contract const step = trace[index] if (this.isCallInstruction(step)) { - return index + 1 < trace.length && trace[index + 1].stack.length !== 0 + return index + 1 < trace.length && (trace[index].depth === trace[index + 1].depth) } return false }