mpl_distro/generated/errors/
mpl_distro.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 MplDistroError {
13    /// 0 (0x0) - Invalid System Program
14    #[error("Invalid System Program")]
15    InvalidSystemProgram,
16    /// 1 (0x1) - Error deserializing account
17    #[error("Error deserializing account")]
18    DeserializationError,
19    /// 2 (0x2) - Error serializing account
20    #[error("Error serializing account")]
21    SerializationError,
22    /// 3 (0x3) - Invalid Distribution PDA Derivation
23    #[error("Invalid Distribution PDA Derivation")]
24    InvalidDistributionPdaDerivation,
25    /// 4 (0x4) - Invalid Spl Token Program
26    #[error("Invalid Spl Token Program")]
27    InvalidSplTokenProgram,
28    /// 5 (0x5) - Invalid Fee Wallet
29    #[error("Invalid Fee Wallet")]
30    InvalidFeeWallet,
31    /// 6 (0x6) - Invalid Token Program
32    #[error("Invalid Token Program")]
33    InvalidTokenProgram,
34    /// 7 (0x7) - Invalid Associated Token Program
35    #[error("Invalid Associated Token Program")]
36    InvalidAssociatedTokenProgram,
37    /// 8 (0x8) - Invalid Distribution Account Owner
38    #[error("Invalid Distribution Account Owner")]
39    InvalidDistributionAccountOwner,
40    /// 9 (0x9) - The distribution has already started
41    #[error("The distribution has already started")]
42    DistributionStarted,
43    /// 10 (0xA) - Invalid Mint
44    #[error("Invalid Mint")]
45    InvalidMint,
46    /// 11 (0xB) - Invalid Distribution Authority
47    #[error("Invalid Distribution Authority")]
48    InvalidDistributionAuthority,
49    /// 12 (0xC) - Invalid Payer Token Account
50    #[error("Invalid Payer Token Account")]
51    InvalidPayerTokenAccount,
52    /// 13 (0xD) - Invalid Distribution Token Account
53    #[error("Invalid Distribution Token Account")]
54    InvalidDistributionTokenAccount,
55    /// 14 (0xE) - The distribution has not started yet
56    #[error("The distribution has not started yet")]
57    DistributionNotStarted,
58    /// 15 (0xF) - The distribution has ended
59    #[error("The distribution has ended")]
60    DistributionEnded,
61    /// 16 (0x10) - Invalid Recipient Token Account
62    #[error("Invalid Recipient Token Account")]
63    InvalidRecipientTokenAccount,
64    /// 17 (0x11) - Invalid Claim Proof
65    #[error("Invalid Claim Proof")]
66    InvalidClaimProof,
67    /// 18 (0x12) - The tokens have already been claimed by this recipient
68    #[error("The tokens have already been claimed by this recipient")]
69    AlreadyClaimed,
70    /// 19 (0x13) - Invalid Claim Receipt PDA Derivation
71    #[error("Invalid Claim Receipt PDA Derivation")]
72    InvalidClaimReceiptPdaDerivation,
73    /// 20 (0x14) - End time must be after start time
74    #[error("End time must be after start time")]
75    InvalidDistributionTimeRange,
76    /// 21 (0x15) - Name must be 32 bytes or less
77    #[error("Name must be 32 bytes or less")]
78    NameTooLong,
79    /// 22 (0x16) - Invalid Depositor Token Account
80    #[error("Invalid Depositor Token Account")]
81    InvalidDepositorTokenAccount,
82    /// 23 (0x17) - Mint must be owned by the SPL Token Program
83    #[error("Mint must be owned by the SPL Token Program")]
84    InvalidMintOwner,
85    /// 24 (0x18) - Cannot withdraw funds while distribution is active
86    #[error("Cannot withdraw funds while distribution is active")]
87    CannotWithdrawDuringActiveDistribution,
88    /// 25 (0x19) - Arithmetic operation overflowed
89    #[error("Arithmetic operation overflowed")]
90    ArithmeticOverflow,
91    /// 26 (0x1A) - Insufficient funds in distribution to fulfill claim amount
92    #[error("Insufficient funds in distribution to fulfill claim amount")]
93    InsufficientFunds,
94    /// 27 (0x1B) - Tree height exceeds maximum supported height
95    #[error("Tree height exceeds maximum supported height")]
96    InvalidTreeHeight,
97    /// 28 (0x1C) - Invalid Payer
98    #[error("Invalid Payer")]
99    InvalidPayer,
100    /// 29 (0x1D) - Insufficient funds in Distribution to subsidize receipts
101    #[error("Insufficient funds in Distribution to subsidize receipts")]
102    InsufficientFundsToSubsidizeReceipts,
103    /// 30 (0x1E) - Invalid NFT Mint
104    #[error("Invalid NFT Mint")]
105    InvalidNftMint,
106    /// 31 (0x1F) - Invalid NFT Amount
107    #[error("Invalid NFT Amount")]
108    InvalidNftAmount,
109    /// 32 (0x20) - Invalid NFT Owner
110    #[error("Invalid NFT Owner")]
111    InvalidNftOwner,
112    /// 33 (0x21) - Recipient must sign
113    #[error("Recipient must sign")]
114    RecipientMustSign,
115    /// 34 (0x22) - Distribution authority must sign
116    #[error("Distribution authority must sign")]
117    DistributionAuthorityMustSign,
118    /// 35 (0x23) - Invalid Distribution Type
119    #[error("Invalid Distribution Type")]
120    InvalidDistributionType,
121    /// 36 (0x24) - Invalid NFT Token Account Owner
122    #[error("Invalid NFT Token Account Owner")]
123    InvalidNftTokenAccountOwner,
124    /// 37 (0x25) - Insufficient funds in distribution to withdraw requested SOL amount
125    #[error("Insufficient funds in distribution to withdraw requested SOL amount")]
126    InsufficientFundsToWithdrawSol,
127    /// 38 (0x26) - Distribution does not subsidize receipts
128    #[error("Distribution does not subsidize receipts")]
129    DistributionDoesNotSubsidizeReceipts,
130    /// 39 (0x27) - Cannot withdraw while distribution is active
131    #[error("Cannot withdraw while distribution is active")]
132    CannotWithdrawWhileActive,
133    /// 40 (0x28) - Invalid distributor for this distribution
134    #[error("Invalid distributor for this distribution")]
135    InvalidDistributor,
136}
137
138impl solana_program::program_error::PrintProgramError for MplDistroError {
139    fn print<E>(&self) {
140        solana_program::msg!(&self.to_string());
141    }
142}