Interface TransactionProcessingResult


public interface TransactionProcessingResult
This interface represents the result of processing a transaction. It provides methods to access various details about the transaction processing result such as logs, gas remaining, output, and status.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the estimate gas used by the transaction, the difference between the transactions gas limit and the remaining gas
    long
    Returns the gas remaining after the transaction was processed.
    Return the reason why the transaction is invalid or empty if the transaction is successful
    List<org.hyperledger.besu.datatypes.Log>
    Return the logs produced by the transaction.
    org.apache.tuweni.bytes.Bytes
    Returns the output.
    Optional<org.apache.tuweni.bytes.Bytes>
    Returns the reason why a transaction was reverted (if applicable).
    boolean
    Returns whether the transaction failed.
    boolean
    Returns whether the transaction was invalid.
    boolean
    Returns whether the transaction was successfully processed.
  • Method Details

    • getLogs

      List<org.hyperledger.besu.datatypes.Log> getLogs()
      Return the logs produced by the transaction.

      This is only valid when TransactionProcessor#isSuccessful returns true.

      Returns:
      the logs produced by the transaction
    • getGasRemaining

      long getGasRemaining()
      Returns the gas remaining after the transaction was processed.

      This is only valid when TransactionProcessor#isSuccessful returns true.

      Returns:
      the gas remaining after the transaction was processed
    • getEstimateGasUsedByTransaction

      long getEstimateGasUsedByTransaction()
      Returns the estimate gas used by the transaction, the difference between the transactions gas limit and the remaining gas
      Returns:
      the estimate gas used
    • getOutput

      org.apache.tuweni.bytes.Bytes getOutput()
      Returns the output.
      Returns:
      the output.
    • isInvalid

      boolean isInvalid()
      Returns whether the transaction was invalid.
      Returns:
      true if the transaction was invalid; otherwise false
    • isSuccessful

      boolean isSuccessful()
      Returns whether the transaction was successfully processed.
      Returns:
      true if the transaction was successfully processed; otherwise false
    • isFailed

      boolean isFailed()
      Returns whether the transaction failed.
      Returns:
      true if the transaction failed; otherwise false
    • getRevertReason

      Optional<org.apache.tuweni.bytes.Bytes> getRevertReason()
      Returns the reason why a transaction was reverted (if applicable).
      Returns:
      the revert reason.
    • getInvalidReason

      Optional<String> getInvalidReason()
      Return the reason why the transaction is invalid or empty if the transaction is successful
      Returns:
      the optional invalid reason as a string