public Optional<TransactionAdapter> getTransactionAt(final DataFetchingEnvironment environment) {
    final int index = ((Number) environment.getArgument("index")).intValue();
    final List<TransactionWithMetadata> trans = blockWithMetaData.getTransactions();

    if (trans.size() > index) {
      return Optional.of(new TransactionAdapter(trans.get(index)));
    }

    return Optional.empty();
  }
Returns a TransactionAdapter object for the transaction at the given index in the block.

<p>The index is retrieved from the data fetching environment. If there is no transaction at the
given index, an empty Optional is returned.

@param environment the data fetching environment.
@return an Optional containing a TransactionAdapter object for the transaction at the given
    index in the block, or an empty Optional if there is no transaction at the given index.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/graphql/internal/pojoadapter/NormalBlockAdapter.java