OZContractErrorCodes

public enum OZContractErrorCodes

Reference constants for a subset of the OpenZeppelin smart-account contract’s on-chain error codes.

When the contract rejects a call, the code appears inside the message of a SmartAccountTransactionException (for example Error(Contract, #3016)). The SDK surfaces the raw error but does not parse or map contract error codes itself; callers can extract the code from the message and compare it against these constants.

Error code range: 3xxx (credential errors, aligned with the contract’s Error enum).

  • Integer arithmetic overflow occurred in the contract.

    Declaration

    Swift

    public static let mathOverflow: Int
  • The key_data field on a signer exceeds the maximum allowed size.

    Declaration

    Swift

    public static let keyDataTooLarge: Int
  • The number of context rule IDs in the auth payload does not match the expected count.

    Declaration

    Swift

    public static let contextRuleIdsLengthMismatch: Int
  • A name field (e.g. context rule name) exceeds the maximum allowed length.

    Declaration

    Swift

    public static let nameTooLong: Int
  • The signer is not authorized to sign the given context rule.

    Declaration

    Swift

    public static let unauthorizedSigner: Int