Skip to content

Commit

Permalink
WIP: Work around HH 2.22.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Xanewok committed Aug 21, 2024
1 parent 986e827 commit 00bd271
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,24 @@ export type MessageTrace =
| CreateMessageTrace
| CallMessageTrace
| PrecompileMessageTrace;

// WIP: Remove all of these once the feature branch is bumped above HH v2.22.6
export type EvmMessageTrace = CreateMessageTrace | CallMessageTrace;
export function isPrecompileTrace(
trace: MessageTrace
): trace is PrecompileMessageTrace {
return "precompile" in trace;
}

export function isCallTrace(trace: MessageTrace): trace is CallMessageTrace {
return "code" in trace && "calldata" in trace;
}

export interface EvmStep {
pc: number;
}

export type MessageTraceStep = MessageTrace | EvmStep;
export function isEvmStep(step: MessageTraceStep): step is EvmStep {
return "pc" in step && step.pc !== undefined;
}

0 comments on commit 00bd271

Please sign in to comment.