SmartAccountTransactionException
public class SmartAccountTransactionException : SmartAccountException, @unchecked Sendable
Transaction-related errors (5xxx range).
-
Indicates that transaction simulation against the RPC failed.
A failure the RPC reports in its simulation response carries the response’s diagnostic events in
See morediagnosticEventsXdrand the contract error the response reports inreportedContractError;OZContractErrorCodes.decodeFromSimulationFailure(_:)names a known code. Transport, JSON-RPC and parsing failures and the kit’s own checks carry[]andnil.Declaration
Swift
public final class SimulationFailed : SmartAccountTransactionException, @unchecked Sendable -
Indicates that producing or attaching a signature failed.
See moreDeclaration
Swift
public final class SigningFailed : SmartAccountTransactionException, @unchecked Sendable -
Indicates that submitting the signed transaction failed.
See moreDeclaration
Swift
public final class SubmissionFailed : SmartAccountTransactionException, @unchecked Sendable -
Indicates that polling for transaction completion timed out.
See moreDeclaration
Swift
public final class Timeout : SmartAccountTransactionException, @unchecked Sendable -
Undocumented
Declaration
Swift
public static func simulationFailed(reason: String, cause: Error? = nil) -> SimulationFailed -
Creates a
SimulationFailedfor a failed simulation response.The message is “Transaction simulation failed: ” and
reason, followed by “ (contract error in diagnostic events: Error(Contract, #N), contract C…)” whenreportedContractErrorcomes from the diagnostic events; the contract part is absent when the event has no contract ID.Declaration
Swift
public static func simulationFailed( reason: String, diagnosticEventsXdr: [String], reportedContractError: ReportedContractError?, cause: Error? = nil ) -> SimulationFailedParameters
reasonThe failure description, typically a prefix and the RPC’s error text.
diagnosticEventsXdrThe response’s base64 diagnostic events.
reportedContractErrorThe contract error the response reports, or
nil.causeOptional underlying error that triggered this exception.
Return Value
The simulation failure.
-
Undocumented
Declaration
Swift
public static func signingFailed(reason: String, cause: Error? = nil) -> SigningFailed -
Undocumented
Declaration
Swift
public static func submissionFailed(reason: String, cause: Error? = nil) -> SubmissionFailed -
Undocumented
Declaration
Swift
public static func timeout(details: String? = nil, cause: Error? = nil) -> Timeout
View on GitHub
Install in Dash