mpl_vault/generated/errors/
mpl_vault.rs

1//! This code was AUTOGENERATED using the kinobi library.
2//! Please DO NOT EDIT THIS FILE, instead use visitors
3//! to add features, then rerun kinobi to update it.
4//!
5//! [https://github.com/metaplex-foundation/kinobi]
6//!
7
8use num_derive::FromPrimitive;
9use thiserror::Error;
10
11#[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)]
12pub enum MplVaultError {
13    /// 0 (0x0) - vault account aleady exists
14    #[error("vault account aleady exists")]
15    VaultAlreadyExists,
16    /// 1 (0x1) - invalid derivation for Vault account
17    #[error("invalid derivation for Vault account")]
18    InvalidDerivation,
19    /// 2 (0x2) - invalid account owner
20    #[error("invalid account owner")]
21    InvalidOwner,
22    /// 3 (0x3) - account has no data
23    #[error("account has no data")]
24    AccountIsEmpty,
25    /// 4 (0x4) - invalid account key
26    #[error("invalid account key")]
27    InvalidAccountKey,
28    /// 5 (0x5) - invalid vault authority
29    #[error("invalid vault authority")]
30    InvalidAuthority,
31    /// 6 (0x6) - invalid vault creator
32    #[error("invalid vault creator")]
33    InvalidCreator,
34    /// 7 (0x7) - numericalOverflowError
35    #[error("numericalOverflowError")]
36    NumericalOverflow,
37    /// 8 (0x8) - token not found in vault
38    #[error("token not found in vault")]
39    TokenNotInVault,
40    /// 9 (0x9) - missing token record account
41    #[error("missing token record account")]
42    MissingTokenRecord,
43    /// 10 (0xA) - missing token auth rules program
44    #[error("missing token auth rules program")]
45    MissingTokenAuthRulesProgram,
46    /// 11 (0xB) - vault is not empty
47    #[error("vault is not empty")]
48    NotEmpty,
49    /// 12 (0xC) - invalid validator account
50    #[error("invalid validator account")]
51    InvalidValidator,
52    /// 13 (0xD) - missing authority account
53    #[error("missing authority account")]
54    MissingAuthority,
55    /// 14 (0xE) - missing redeemer account
56    #[error("missing redeemer account")]
57    MissingRedeemer,
58    /// 15 (0xF) - missing pass account
59    #[error("missing pass account")]
60    MissingPass,
61    /// 16 (0x10) - invalid pass account
62    #[error("invalid pass account")]
63    InvalidPass,
64    /// 17 (0x11) - failed to remove redeemer
65    #[error("failed to remove redeemer")]
66    RemoveRedeemerFailed,
67    /// 18 (0x12) - redeemer not set
68    #[error("redeemer not set")]
69    RedeemerNotSet,
70    /// 19 (0x13) - vault is empty
71    #[error("vault is empty")]
72    EmptyVault,
73    /// 20 (0x14) - amount is greater than token balance
74    #[error("amount is greater than token balance")]
75    InvalidAmount,
76    /// 21 (0x15) - missing vault token account
77    #[error("missing vault token account")]
78    MissingVaultTokenAccount,
79    /// 22 (0x16) - missing spl ata program
80    #[error("missing spl ata program")]
81    MissingSplAtaProgram,
82    /// 23 (0x17) - missing master edition
83    #[error("missing master edition")]
84    MissingMasterEdition,
85}
86
87impl solana_program::program_error::PrintProgramError for MplVaultError {
88    fn print<E>(&self) {
89        solana_program::msg!(&self.to_string());
90    }
91}