public Optional<Long> getStatus(final DataFetchingEnvironment environment) {
    return getReceipt(environment)
        .map(TransactionReceiptWithMetadata::getReceipt)
        .flatMap(
            receipt ->
                receipt.getStatus() == -1
                    ? Optional.empty()
                    : Optional.of((long) receipt.getStatus()));
  }
Retrieves the status of the transaction.

<p>This method uses the getReceipt method to get the receipt of the transaction. It then checks
the status of the receipt. If the status is -1, it returns an empty Optional. Otherwise, it
returns an Optional containing the status of the receipt.

@param environment the data fetching environment.
@return an Optional containing a Long object representing the status of the transaction, or an
    empty Optional if the status of the receipt is -1.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/graphql/internal/pojoadapter/TransactionAdapter.java