Skip to main content

mpl_gavel/generated/errors/
mpl_gavel.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 MplGavelError {
13    /// 0 (0x0) - Missing required signer
14    #[error("Missing required signer")]
15    MissingSigner,
16    /// 1 (0x1) - Account space not allocated
17    #[error("Account space not allocated")]
18    AccountSpaceNotAllocated,
19    /// 2 (0x2) - Invalid account key
20    #[error("Invalid account key")]
21    InvalidAccountKey,
22    /// 3 (0x3) - Account has an invalid owner
23    #[error("Account has an invalid owner")]
24    InvalidOwner,
25    /// 4 (0x4) - Invalid account size
26    #[error("Invalid account size")]
27    InvalidAccountSize,
28    /// 5 (0x5) - Invalid system program account
29    #[error("Invalid system program account")]
30    InvalidSystemProgramAccount,
31    /// 6 (0x6) - Invalid Spl Token program account
32    #[error("Invalid Spl Token program account")]
33    InvalidSplTokenProgramAccount,
34    /// 7 (0x7) - Invalid Spl ATA program account
35    #[error("Invalid Spl ATA program account")]
36    InvalidSplAtaProgramAccount,
37    /// 8 (0x8) - Expired end date
38    #[error("Expired end date")]
39    ExpiredEndDate,
40    /// 9 (0x9) - Amount is too low
41    #[error("Amount is too low")]
42    AmountTooLow,
43    /// 10 (0xA) - Could not add a bid
44    #[error("Could not add a bid")]
45    AddBidFailed,
46    /// 11 (0xB) - NumericalOverflowError
47    #[error("NumericalOverflowError")]
48    NumericalOverflow,
49    /// 12 (0xC) - Bid account already exists
50    #[error("Bid account already exists")]
51    BidAccountAlreadyExists,
52    /// 13 (0xD) - Invalid account key derivation
53    #[error("Invalid account key derivation")]
54    InvalidDerivation,
55    /// 14 (0xE) - Bid amount can only increase
56    #[error("Bid amount can only increase")]
57    InvalidBidAmount,
58    /// 15 (0xF) - Missing bid account
59    #[error("Missing bid account")]
60    MissingBidAccount,
61    /// 16 (0x10) - Invalid account key value
62    #[error("Invalid account key value")]
63    InvalidAccountKeyValue,
64    /// 17 (0x11) - Auction is in progress
65    #[error("Auction is in progress")]
66    AuctionInProgress,
67    /// 18 (0x12) - Refund not allowed
68    #[error("Refund not allowed")]
69    RefundNotAllowed,
70    /// 19 (0x13) - Account already initialized
71    #[error("Account already initialized")]
72    AlreadyInitialized,
73    /// 20 (0x14) - Start date is greater or equal to end date
74    #[error("Start date is greater or equal to end date")]
75    InvalidStartDate,
76    /// 21 (0x15) - Start value lower than minimum value
77    #[error("Start value lower than minimum value")]
78    InvalidStartValue,
79    /// 22 (0x16) - Invalid mint
80    #[error("Invalid mint")]
81    InvalidMint,
82    /// 23 (0x17) - Auction not started
83    #[error("Auction not started")]
84    AuctionNotStarted,
85    /// 24 (0x18) - Auction is live
86    #[error("Auction is live")]
87    AuctionIsLive,
88    /// 25 (0x19) - Missing source token account
89    #[error("Missing source token account")]
90    MissingSourceTokenAccount,
91    /// 26 (0x1A) - Missing destination token account
92    #[error("Missing destination token account")]
93    MissingDestinationTokenAccount,
94    /// 27 (0x1B) - Missing mint account
95    #[error("Missing mint account")]
96    MissingMintAccount,
97    /// 28 (0x1C) - invalid tick value
98    #[error("invalid tick value")]
99    InvalidTickValue,
100    /// 29 (0x1D) - Invalid auctioneer account
101    #[error("Invalid auctioneer account")]
102    InvalidAuctioneerAccount,
103    /// 30 (0x1E) - Invalid auction mode
104    #[error("Invalid auction mode")]
105    InvalidAuctionMode,
106    /// 31 (0x1F) - Missing payer account
107    #[error("Missing payer account")]
108    MissingPayerAccount,
109    /// 32 (0x20) - Not a winning bid
110    #[error("Not a winning bid")]
111    NotWinningBid,
112    /// 33 (0x21) - Missing system program account
113    #[error("Missing system program account")]
114    MissingSystemProgram,
115    /// 34 (0x22) - Bid already settled
116    #[error("Bid already settled")]
117    BidAlreadySettled,
118    /// 35 (0x23) - Invalid treasury account
119    #[error("Invalid treasury account")]
120    InvalidTreasuryAccount,
121    /// 36 (0x24) - Invalid bid owner
122    #[error("Invalid bid owner")]
123    InvalidBidOwner,
124    /// 37 (0x25) - Auction account does not match
125    #[error("Auction account does not match")]
126    MismatchAuction,
127    /// 38 (0x26) - Invalid authority
128    #[error("Invalid authority")]
129    InvalidAuthority,
130    /// 39 (0x27) - Token account does not exist
131    #[error("Token account does not exist")]
132    TokenAccountDoesNotExist,
133    /// 40 (0x28) - Invalid refund fee
134    #[error("Invalid refund fee")]
135    InvalidRefundFee,
136    /// 41 (0x29) - Auction is full
137    #[error("Auction is full")]
138    AuctionIsFull,
139}
140
141impl solana_program::program_error::PrintProgramError for MplGavelError {
142    fn print<E>(&self) {
143        solana_program::msg!(&self.to_string());
144    }
145}