1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
use anchor_lang::error_code;

#[error_code]
pub enum CandyGuardError {
    #[msg("Could not save guard to account")]
    InvalidAccountSize,

    #[msg("Could not deserialize guard")]
    DeserializationError,

    #[msg("Public key mismatch")]
    PublicKeyMismatch,

    #[msg("Exceeded account increase limit")]
    DataIncrementLimitExceeded,

    #[msg("Account does not have correct owner")]
    IncorrectOwner,

    #[msg("Account is not initialized")]
    Uninitialized,

    #[msg("Missing expected remaining account")]
    MissingRemainingAccount,

    #[msg("Numerical overflow error")]
    NumericalOverflowError,

    #[msg("Missing required group label")]
    RequiredGroupLabelNotFound,

    #[msg("Group not found")]
    GroupNotFound,

    #[msg("Value exceeded maximum length")]
    ExceededLength,

    #[msg("Candy machine is empty")]
    CandyMachineEmpty,

    #[msg("No instruction was found")]
    InstructionNotFound,

    #[msg("Collection public key mismatch")]
    CollectionKeyMismatch,

    #[msg("Missing collection accounts")]
    MissingCollectionAccounts,

    #[msg("Collection update authority public key mismatch")]
    CollectionUpdateAuthorityKeyMismatch,

    #[msg("Mint must be the last instructions of the transaction")]
    MintNotLastTransaction,

    #[msg("Mint is not live")]
    MintNotLive,

    #[msg("Not enough SOL to pay for the mint")]
    NotEnoughSOL,

    #[msg("Token burn failed")]
    TokenBurnFailed,

    #[msg("Not enough tokens on the account")]
    NotEnoughTokens,

    #[msg("Token transfer failed")]
    TokenTransferFailed,

    #[msg("A signature was required but not found")]
    MissingRequiredSignature,

    #[msg("Gateway token is not valid")]
    GatewayTokenInvalid,

    #[msg("Current time is after the set end date")]
    AfterEndDate,

    #[msg("Current time is not within the allowed mint time")]
    InvalidMintTime,

    #[msg("Address not found on the allowed list")]
    AddressNotFoundInAllowedList,

    #[msg("Missing allowed list proof")]
    MissingAllowedListProof,

    #[msg("Allow list guard is not enabled")]
    AllowedListNotEnabled,

    #[msg("The maximum number of allowed mints was reached")]
    AllowedMintLimitReached,

    #[msg("Invalid NFT collection")]
    InvalidNftCollection,

    #[msg("Missing NFT on the account")]
    MissingNft,

    #[msg("Current redemeed items is at the set maximum amount")]
    MaximumRedeemedAmount,

    #[msg("Address not authorized")]
    AddressNotAuthorized,

    #[msg("Missing freeze instruction data")]
    MissingFreezeInstruction,

    #[msg("Freeze guard must be enabled")]
    FreezeGuardNotEnabled,

    #[msg("Freeze must be initialized")]
    FreezeNotInitialized,

    #[msg("Missing freeze period")]
    MissingFreezePeriod,

    #[msg("The freeze escrow account already exists")]
    FreezeEscrowAlreadyExists,

    #[msg("Maximum freeze period exceeded")]
    ExceededMaximumFreezePeriod,

    #[msg("Thaw is not enabled")]
    ThawNotEnabled,

    #[msg("Unlock is not enabled (not all NFTs are thawed)")]
    UnlockNotEnabled,

    #[msg("Duplicated group label")]
    DuplicatedGroupLabel,

    #[msg("Duplicated mint limit id")]
    DuplicatedMintLimitId,

    #[msg("An unauthorized program was found in the transaction")]
    UnauthorizedProgramFound,

    #[msg("Exceeded the maximum number of programs in the additional list")]
    ExceededProgramListSize,

    #[msg("Allocation PDA not initialized")]
    AllocationNotInitialized,

    #[msg("Allocation limit was reached")]
    AllocationLimitReached,

    #[msg("Allocation guard must be enabled")]
    AllocationGuardNotEnabled,

    #[msg("Candy machine has an invalid mint authority")]
    InvalidMintAuthority,

    #[msg("Instruction could not be created")]
    InstructionBuilderFailed,

    #[msg("Invalid account version")]
    InvalidAccountVersion,
}