@Override
  public Optional<TransactionSimulationResult> simulate(
      final Transaction transaction,
      final Optional<StateOverrideMap> maybeStateOverrides,
      final ProcessableBlockHeader pendingBlockHeader,
      final OperationTracer operationTracer,
      final boolean isAllowExceedingBalance,
      final boolean isAllowFutureNonce) {

    final CallParameter callParameter = CallParameter.fromTransaction(transaction);

    return transactionSimulator
        .processOnPending(
            callParameter,
            maybeStateOverrides,
            isAllowExceedingBalance
                ? isAllowFutureNonce
                    ? transactionSimulatorAllowExceedingBalanceAndFutureNonce()
                    : transactionSimulatorAllowExceedingBalance()
                : isAllowFutureNonce
                    ? transactionSimulatorAllowFutureNonce()
                    : transactionSimulator(),
            operationTracer,
            (org.hyperledger.besu.ethereum.core.ProcessableBlockHeader) pendingBlockHeader)
        .map(res -> new TransactionSimulationResult(transaction, res.result()));
  }
Configure the service

@param blockchain the blockchain
@param transactionSimulator transaction simulator
app/src/main/java/org/hyperledger/besu/services/TransactionSimulationServiceImpl.java