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
use anchor_lang::prelude::*;

#[error_code]
pub enum ErrorCode {
    #[msg("Account not initialized")]
    Uninitialized,
    #[msg("Too many invalidators have already been added")]
    TooManyInvalidators,
    #[msg("Number of invalidators cannot be overwritten")]
    InvalidNumInvalidators,
    #[msg("Token account not owned by token manager")]
    InvalidTokenManagerTokenAccount,
    #[msg("Token account not owned by issuer")]
    InvalidIssuerTokenAccount,
    #[msg("Max invalidators reached")]
    MaximumInvalidatorsReached,
    #[msg("Token account not owned by recipient")]
    InvalidRecipientTokenAccount,
    #[msg("Token account not owned by invalidator")]
    InvalidInvalidatorTokenAccount,
    #[msg("Token manager kind is not valid")]
    InvalidTokenManagerKind,
    #[msg("Invalid invalidation type")]
    InvalidInvalidationType,
    #[msg("Invalid claim authority")]
    InvalidClaimAuthority,
    #[msg("Invalid transfer authority")]
    InvalidTransferAuthority,
    #[msg("Invalid issuer")]
    InvalidIssuer,
    #[msg("Invalid invalidator")]
    InvalidInvalidator,
    #[msg("Invalid mint")]
    InvalidMint,
    #[msg("Invalid token manager state")]
    InvalidTokenManagerState,
    #[msg("Outstanding tokens exist")]
    OutstandingTokens,
    #[msg("User must be freeze authority to create mint manager")]
    InvalidFreezeAuthority,
    #[msg("User must be initializer to close mint manager")]
    InvalidInitializer,
    #[msg("Invalid claim receipt")]
    InvalidClaimReceipt,
    #[msg("Invalid transfer receipt")]
    InvalidTransferReceipt,
    #[msg("Public key mismatch")]
    PublicKeyMismatch,
    #[msg("Invalid metadata program id")]
    InvalidMetadataProgramId,
    #[msg("Invalid receipt mint account")]
    InvalidReceiptMintAccount,
    #[msg("Invalid receipt mint owner")]
    InvalidReceiptMintOwner,
    #[msg("Invalid receipt mint")]
    InvalidReceiptMint,
    #[msg("Invalid current holder token account")]
    InvalidCurrentTokenAccount,
    #[msg("Invalid mint supply")]
    InvalidMintSupply,
    #[msg("Invalid account discriminator")]
    AccountDiscriminatorMismatch,
    #[msg("Invalidation type update only allowed between return and reissue")]
    InvalidationTypeUpdateDisallowed,
    #[msg("Claim approver must be set to use vesting invalidation type")]
    ClaimApproverMustBeSet,
    #[msg("Target token account is incorrect")]
    InvalidTargetTokenAccount,
    #[msg("Transaction included disallowed")]
    InstructionsDisallowed,
    #[msg("Invalidation type is not allowed with this token manager kind")]
    InvalidInvalidationTypeKindMatch,
    #[msg("Invalid Mint Authority")]
    InvalidMintAuthority,
    #[msg("Invalid Permissioned Reward Address")]
    InvalidPermissionedRewardAddress,
    #[msg("No CPI allowed for the instruction")]
    NoCPIAllowed,
    #[msg("Invalid migrate authority")]
    InvalidMigrateAuthority,
    #[msg("Cannot migrate delegated token")]
    CannotMigrateDelegatedToken,
    #[msg("Invalid return target")]
    InvalidReturnTarget,
}