private void completeStep(
      final TraceFrame frame, final VmOperation op, final VmOperationExecutionReport report) {
    // add the operation representation to the list of traces
    final Optional<ExceptionalHaltReason> exceptionalHaltReason = frame.getExceptionalHaltReason();
    if (frame.getDepth() > 0
        && exceptionalHaltReason.isPresent()
        && exceptionalHaltReason.get() == ExceptionalHaltReason.INSUFFICIENT_GAS) {
      op.setVmOperationExecutionReport(null);
    } else {
      op.setVmOperationExecutionReport(report);
    }
    if (currentTrace != null) {
      currentTrace.add(op);
    }
    currentIndex++;
  }
Add a trace frame to the VmTrace result object.

@param frame the current trace frame
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/tracing/vm/VmTraceGenerator.java