Skip to main content

mpl_bubblegum/generated/errors/
mpl_bubblegum.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 MplBubblegumError {
13    /// 6000 (0x1770) - Asset Owner Does not match
14    #[error("Asset Owner Does not match")]
15    AssetOwnerMismatch,
16    /// 6001 (0x1771) - PublicKeyMismatch
17    #[error("PublicKeyMismatch")]
18    PublicKeyMismatch,
19    /// 6002 (0x1772) - Hashing Mismatch Within Leaf Schema
20    #[error("Hashing Mismatch Within Leaf Schema")]
21    HashingMismatch,
22    /// 6003 (0x1773) - Unsupported Schema Version
23    #[error("Unsupported Schema Version")]
24    UnsupportedSchemaVersion,
25    /// 6004 (0x1774) - Creator shares must sum to 100
26    #[error("Creator shares must sum to 100")]
27    CreatorShareTotalMustBe100,
28    /// 6005 (0x1775) - No duplicate creator addresses in metadata
29    #[error("No duplicate creator addresses in metadata")]
30    DuplicateCreatorAddress,
31    /// 6006 (0x1776) - Creator did not verify the metadata
32    #[error("Creator did not verify the metadata")]
33    CreatorDidNotVerify,
34    /// 6007 (0x1777) - Creator not found in creator Vec
35    #[error("Creator not found in creator Vec")]
36    CreatorNotFound,
37    /// 6008 (0x1778) - No creators in creator Vec
38    #[error("No creators in creator Vec")]
39    NoCreatorsPresent,
40    /// 6009 (0x1779) - User-provided creator Vec must result in same user-provided creator hash
41    #[error("User-provided creator Vec must result in same user-provided creator hash")]
42    CreatorHashMismatch,
43    /// 6010 (0x177A) - User-provided metadata must result in same user-provided data hash
44    #[error("User-provided metadata must result in same user-provided data hash")]
45    DataHashMismatch,
46    /// 6011 (0x177B) - Creators list too long
47    #[error("Creators list too long")]
48    CreatorsTooLong,
49    /// 6012 (0x177C) - Name in metadata is too long
50    #[error("Name in metadata is too long")]
51    MetadataNameTooLong,
52    /// 6013 (0x177D) - Symbol in metadata is too long
53    #[error("Symbol in metadata is too long")]
54    MetadataSymbolTooLong,
55    /// 6014 (0x177E) - Uri in metadata is too long
56    #[error("Uri in metadata is too long")]
57    MetadataUriTooLong,
58    /// 6015 (0x177F) - Basis points in metadata cannot exceed 10000
59    #[error("Basis points in metadata cannot exceed 10000")]
60    MetadataBasisPointsTooHigh,
61    /// 6016 (0x1780) - Tree creator or tree delegate must sign.
62    #[error("Tree creator or tree delegate must sign.")]
63    TreeAuthorityIncorrect,
64    /// 6017 (0x1781) - Not enough unapproved mints left
65    #[error("Not enough unapproved mints left")]
66    InsufficientMintCapacity,
67    /// 6018 (0x1782) - NumericalOverflowError
68    #[error("NumericalOverflowError")]
69    NumericalOverflowError,
70    /// 6019 (0x1783) - Incorrect account owner
71    #[error("Incorrect account owner")]
72    IncorrectOwner,
73    /// 6020 (0x1784) - Cannot Verify Collection in this Instruction
74    #[error("Cannot Verify Collection in this Instruction")]
75    CollectionCannotBeVerifiedInThisInstruction,
76    /// 6021 (0x1785) - Collection Not Found on Metadata
77    #[error("Collection Not Found on Metadata")]
78    CollectionNotFound,
79    /// 6022 (0x1786) - Collection item is already verified.
80    #[error("Collection item is already verified.")]
81    AlreadyVerified,
82    /// 6023 (0x1787) - Collection item is already unverified.
83    #[error("Collection item is already unverified.")]
84    AlreadyUnverified,
85    /// 6024 (0x1788) - Incorrect leaf metadata update authority.
86    #[error("Incorrect leaf metadata update authority.")]
87    UpdateAuthorityIncorrect,
88    /// 6025 (0x1789) - This transaction must be signed by either the leaf owner or leaf delegate
89    #[error("This transaction must be signed by either the leaf owner or leaf delegate")]
90    LeafAuthorityMustSign,
91    /// 6026 (0x178A) - Collection Not Compatable with Compression, Must be Sized
92    #[error("Collection Not Compatable with Compression, Must be Sized")]
93    CollectionMustBeSized,
94    /// 6027 (0x178B) - Metadata mint does not match collection mint
95    #[error("Metadata mint does not match collection mint")]
96    MetadataMintMismatch,
97    /// 6028 (0x178C) - Invalid collection authority
98    #[error("Invalid collection authority")]
99    InvalidCollectionAuthority,
100    /// 6029 (0x178D) - Invalid delegate record pda derivation
101    #[error("Invalid delegate record pda derivation")]
102    InvalidDelegateRecord,
103    /// 6030 (0x178E) - Edition account doesnt match collection
104    #[error("Edition account doesnt match collection")]
105    CollectionMasterEditionAccountInvalid,
106    /// 6031 (0x178F) - Collection Must Be a Unique Master Edition v2
107    #[error("Collection Must Be a Unique Master Edition v2")]
108    CollectionMustBeAUniqueMasterEdition,
109    /// 6032 (0x1790) - Could not convert external error to BubblegumError
110    #[error("Could not convert external error to BubblegumError")]
111    UnknownExternalError,
112    /// 6033 (0x1791) - Decompression is disabled for this tree.
113    #[error("Decompression is disabled for this tree.")]
114    DecompressionDisabled,
115    /// 6034 (0x1792) - Missing collection mint account
116    #[error("Missing collection mint account")]
117    MissingCollectionMintAccount,
118    /// 6035 (0x1793) - Missing collection metadata account
119    #[error("Missing collection metadata account")]
120    MissingCollectionMetadataAccount,
121    /// 6036 (0x1794) - Collection mismatch
122    #[error("Collection mismatch")]
123    CollectionMismatch,
124    /// 6037 (0x1795) - Metadata not mutable
125    #[error("Metadata not mutable")]
126    MetadataImmutable,
127    /// 6038 (0x1796) - Can only update primary sale to true
128    #[error("Can only update primary sale to true")]
129    PrimarySaleCanOnlyBeFlippedToTrue,
130    /// 6039 (0x1797) - Creator did not unverify the metadata
131    #[error("Creator did not unverify the metadata")]
132    CreatorDidNotUnverify,
133    /// 6040 (0x1798) - Only NonFungible standard is supported
134    #[error("Only NonFungible standard is supported")]
135    InvalidTokenStandard,
136    /// 6041 (0x1799) - Canopy size should be set bigger for this tree
137    #[error("Canopy size should be set bigger for this tree")]
138    InvalidCanopySize,
139    /// 6042 (0x179A) - Invalid log wrapper program
140    #[error("Invalid log wrapper program")]
141    InvalidLogWrapper,
142    /// 6043 (0x179B) - Invalid compression program
143    #[error("Invalid compression program")]
144    InvalidCompressionProgram,
145    /// 6044 (0x179C) - Leaf must be delegated to someone other than the leaf owner
146    #[error("Leaf must be delegated to someone other than the leaf owner")]
147    LeafMustBeDelegated,
148    /// 6045 (0x179D) - Asset is frozen
149    #[error("Asset is frozen")]
150    AssetIsFrozen,
151    /// 6046 (0x179E) - Asset is non-transferable
152    #[error("Asset is non-transferable")]
153    AssetIsNonTransferable,
154    /// 6047 (0x179F) - Invalid authority
155    #[error("Invalid authority")]
156    InvalidAuthority,
157    /// 6048 (0x17A0) - Collection is frozen
158    #[error("Collection is frozen")]
159    CollectionIsFrozen,
160    /// 6049 (0x17A1) - Core collections must have the Bubblegum V2 plugin on them
161    #[error("Core collections must have the Bubblegum V2 plugin on them")]
162    CollectionMustHaveBubblegumPlugin,
163    /// 6050 (0x17A2) - Feature not currently available
164    #[error("Feature not currently available")]
165    NotAvailable,
166    /// 6051 (0x17A3) - Missing collection account
167    #[error("Missing collection account")]
168    MissingCollectionAccount,
169    /// 6052 (0x17A4) - Asset data length too long
170    #[error("Asset data length too long")]
171    AssetDataLengthTooLong,
172    /// 6053 (0x17A5) - Item is already in the collection
173    #[error("Item is already in the collection")]
174    AlreadyInCollection,
175    /// 6054 (0x17A6) - Item is already not in a collection
176    #[error("Item is already not in a collection")]
177    AlreadyNotInCollection,
178    /// 6055 (0x17A7) - Missing mpl-core CPI signer account
179    #[error("Missing mpl-core CPI signer account")]
180    MissingMplCoreCpiSignerAccount,
181    /// 6056 (0x17A8) - Asset is not frozen
182    #[error("Asset is not frozen")]
183    AssetIsNotFrozen,
184}
185
186impl solana_program::program_error::PrintProgramError for MplBubblegumError {
187    fn print<E>(&self) {
188        solana_program::msg!(&self.to_string());
189    }
190}