Class TransactionTraceResult

java.lang.Object
org.hyperledger.besu.plugin.data.TransactionTraceResult

public class TransactionTraceResult extends Object
Represents the result of tracing a transaction, including its status and optional error message.
  • Method Details

    • success

      public static TransactionTraceResult success(org.hyperledger.besu.datatypes.Hash txHash)
      Creates a TransactionTraceResult with a successful status and the given transaction hash.
      Parameters:
      txHash - The hash of the traced transaction.
      Returns:
      A successful TransactionTraceResult.
    • error

      public static TransactionTraceResult error(org.hyperledger.besu.datatypes.Hash txHash, String errorMessage)
      Creates a TransactionTraceResult with an error status, the given transaction hash, and an error message.
      Parameters:
      txHash - The hash of the traced transaction.
      errorMessage - An error message describing the issue encountered during tracing.
      Returns:
      An error TransactionTraceResult.
    • getTxHash

      public org.hyperledger.besu.datatypes.Hash getTxHash()
      Get the hash of the traced transaction.
      Returns:
      The hash of the transaction.
    • getStatus

      public TransactionTraceResult.Status getStatus()
      Get the status of the transaction trace.
      Returns:
      The status of the transaction trace.
    • errorMessage

      public Optional<String> errorMessage()
      Get an optional error message associated with the transaction trace.
      Returns:
      An optional error message, which may be empty if no error occurred.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object