class TransactionTracer {

  public Optional<TransactionTrace> traceTransaction(
      final Hash blockHash, final Hash transactionHash, final DebugOperationTracer tracer) {
    return blockReplay.beforeTransactionInBlock(
        blockHash,
        transactionHash,
        (transaction, header, blockchain, mutableWorldState, transactionProcessor) -> {
          final Stopwatch timer = Stopwatch.createStarted();
          final Result result =
              transactionProcessor.processTransaction(
                  blockchain,
                  mutableWorldState.updater(),
                  header,
                  transaction,
                  header.getCoinbase(),
                  tracer,
                  new BlockHashLookup(header, blockchain),
                  false);
          timer.stop();
          return new TransactionTrace(
              transaction, result, tracer.getTraceFrames(), timer.elapsed(TimeUnit.NANOSECONDS));
        });
  }

  public  TransactionTracer(final BlockReplay blockReplay);

}