SimulationFailed
public final class SimulationFailed : SmartAccountTransactionException, @unchecked Sendable
Indicates that transaction simulation against the RPC failed.
A failure the RPC reports in its simulation response carries the response’s diagnostic
events in diagnosticEventsXdr and the contract error the response reports in
reportedContractError; OZContractErrorCodes.decodeFromSimulationFailure(_:) names
a known code. Transport, JSON-RPC and parsing failures and the kit’s own checks carry
[] and nil.
-
The diagnostic events of the failed simulation response as base64
DiagnosticEventXDRstrings in emission order; empty when the failure has no simulation response or the response has no events.Declaration
Swift
public let diagnosticEventsXdr: [String] -
The contract error the failed simulation response reports, or
nil; seeSimulateTransactionResponse.reportedContractError().Declaration
Swift
public let reportedContractError: ReportedContractError? -
Undocumented
Declaration
Swift
public init(message: String, cause: Error? = nil) -
Creates the failure with the simulation response’s events and reported contract error. The message is used as given.
Declaration
Swift
public init( message: String, diagnosticEventsXdr: [String], reportedContractError: ReportedContractError?, cause: Error? = nil )Parameters
messageHuman-readable description of the failure.
diagnosticEventsXdrThe response’s base64 diagnostic events, copied as given.
reportedContractErrorThe contract error the response reports, or
nil.causeOptional underlying error that triggered this exception.
View on GitHub
Install in Dash