Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
printInstruction() {
const instruction = this.session.view(solidity.current.instruction);
const step = this.session.view(trace.step);
const traceIndex = this.session.view(trace.index);
const totalSteps = this.session.view(trace.steps).length;
this.config.logger.log("");
this.config.logger.log(
DebugUtils.formatInstruction(traceIndex + 1, totalSteps, instruction)
);
this.config.logger.log(DebugUtils.formatPC(step.pc));
this.config.logger.log(DebugUtils.formatStack(step.stack));
this.config.logger.log("");
this.config.logger.log(step.gas + " gas remaining");
}