Record Class TransactionSimulationResult
java.lang.Object
java.lang.Record
org.hyperledger.besu.plugin.data.TransactionSimulationResult
- Record Components:
transaction- txresult- res
public record TransactionSimulationResult(org.hyperledger.besu.datatypes.Transaction transaction, TransactionProcessingResult result)
extends Record
TransactionSimulationResult
-
Constructor Summary
ConstructorsConstructorDescriptionTransactionSimulationResult(org.hyperledger.besu.datatypes.Transaction transaction, TransactionProcessingResult result) Creates an instance of aTransactionSimulationResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.longEstimated gas used by the transactionReturn the optional invalid reasonOptional<org.apache.tuweni.bytes.Bytes> Return the optional revert reasonfinal inthashCode()Returns a hash code value for this object.booleanWas the transaction invalid?booleanWas the simulation successful?result()Returns the value of theresultrecord component.final StringtoString()Returns a string representation of this record class.org.hyperledger.besu.datatypes.TransactionReturns the value of thetransactionrecord component.
-
Constructor Details
-
TransactionSimulationResult
public TransactionSimulationResult(org.hyperledger.besu.datatypes.Transaction transaction, TransactionProcessingResult result) Creates an instance of aTransactionSimulationResultrecord class.- Parameters:
transaction- the value for thetransactionrecord componentresult- the value for theresultrecord component
-
-
Method Details
-
isSuccessful
public boolean isSuccessful()Was the simulation successful?- Returns:
- boolean
-
isInvalid
public boolean isInvalid()Was the transaction invalid?- Returns:
- invalid
-
getRevertReason
Return the optional revert reason- Returns:
- the optional revert reason
-
getInvalidReason
-
getGasEstimate
public long getGasEstimate()Estimated gas used by the transaction- Returns:
- estimated gas used
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
transaction
public org.hyperledger.besu.datatypes.Transaction transaction()Returns the value of thetransactionrecord component.- Returns:
- the value of the
transactionrecord component
-
result
-