MCPcopy Create free account
hub / github.com/CashScript/cashscript / logDebugSteps

Function logDebugSteps

packages/cashscript/src/debugging.ts:346–354  ·  view source on GitHub ↗
(
  debugSteps: AuthenticationProgramStateCommon[],
  instructions: AuthenticationInstruction[],
)

Source from the content-addressed store, hash-verified

344
345// eslint-disable-next-line @typescript-eslint/no-unused-vars
346const logDebugSteps = (
347 debugSteps: AuthenticationProgramStateCommon[],
348 instructions: AuthenticationInstruction[],
349): void => {
350 debugSteps.map((step) => {
351 const opcode = instructions[step.ip] ? bytecodeToAsm(encodeAuthenticationInstruction(instructions[step.ip])) : 'null';
352 console.warn(step.ip, opcode, step.stack, step.error);
353 });
354};
355
356const getFinalExecutedVerifyIp = (executedDebugSteps: AuthenticationProgramStateCommon[]): number => {
357 // Map every executed debug step to its corresponding instruction

Callers

nothing calls this directly

Calls 1

bytecodeToAsmFunction · 0.90

Tested by

no test coverage detected