@NotNull
  public Optional<TransactionSimulatorResult> processWithWorldUpdater(
      final CallParameter callParams,
      final Optional<StateOverrideMap> maybeStateOverrides,
      final TransactionValidationParams transactionValidationParams,
      final OperationTracer operationTracer,
      final ProcessableBlockHeader processableHeader,
      final WorldUpdater updater,
      final Address miningBeneficiary,
      final long simulationGasCap,
      final MainnetTransactionProcessor transactionProcessor,
      final BiFunction<ProtocolSpec, Optional<BlockHeader>, Wei> blobGasPricePerGasCalculator,
      final BlockHashLookup blockHashLookup,
      final Supplier<SECPSignature> signatureSupplier) {

    final ProtocolSpec protocolSpec = protocolSchedule.getByBlockHeader(processableHeader);
    final Address senderAddress = callParams.getSender().orElse(DEFAULT_FROM);

    final ProcessableBlockHeader blockHeaderToProcess;
    if (transactionValidationParams.isAllowExceedingBalance()
        && processableHeader.getBaseFee().isPresent()) {
      blockHeaderToProcess =
          new BlockHeaderBuilder()
              .populateFrom(processableHeader)
              .baseFee(Wei.ZERO)
              .blockHeaderFunctions(protocolSpec.getBlockHeaderFunctions())
              .buildProcessableBlockHeader();
    } else {
      blockHeaderToProcess = processableHeader;
    }
    if (maybeStateOverrides.isPresent()) {
      for (Address accountToOverride : maybeStateOverrides.get().keySet()) {
        final StateOverride overrides = maybeStateOverrides.get().get(accountToOverride);
        applyOverrides(updater.getOrCreate(accountToOverride), overrides);
      }
    }

    final long nonce =
        callParams
            .getNonce()
            .orElseGet(
                () ->
                    Optional.ofNullable(updater.get(senderAddress))
                        .map(Account::getNonce)
                        .orElse(0L));

    final Optional<BlockHeader> maybeParentHeader =
        blockchain.getBlockHeader(processableHeader.getParentHash());
    final Wei blobGasPrice = blobGasPricePerGasCalculator.apply(protocolSpec, maybeParentHeader);

    final Optional<Transaction> maybeTransaction =
        buildTransaction(
            callParams,
            transactionValidationParams,
            processableHeader,
            senderAddress,
            nonce,
            simulationGasCap,
            blobGasPrice,
            signatureSupplier);
    if (maybeTransaction.isEmpty()) {
      return Optional.empty();
    }

    final Transaction transaction = maybeTransaction.get();
    final TransactionProcessingResult result =
        transactionProcessor.processTransaction(
            updater,
            blockHeaderToProcess,
            transaction,
            miningBeneficiary,
            operationTracer,
            blockHashLookup,
            transactionValidationParams,
            blobGasPrice);

    return Optional.of(new TransactionSimulatorResult(transaction, result));
  }
Processes a transaction simulation with the provided parameters and executes pre-worldstate
close actions.

@param callParams The call parameters for the transaction.
@param maybeStateOverrides The map of state overrides to apply to the state for this
    transaction.
@param transactionValidationParams The validation parameters for the transaction.
@param operationTracer The tracer for capturing operations during processing.
@param preWorldStateCloseGuard The pre-worldstate close guard for executing pre-close actions.
@param header The block header.
@return An Optional containing the result of the processing.
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/transaction/TransactionSimulator.java