mpl_gavel/generated/errors/
mpl_gavel.rs1use num_derive::FromPrimitive;
9use thiserror::Error;
10
11#[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)]
12pub enum MplGavelError {
13 #[error("Missing required signer")]
15 MissingSigner,
16 #[error("Account space not allocated")]
18 AccountSpaceNotAllocated,
19 #[error("Invalid account key")]
21 InvalidAccountKey,
22 #[error("Account has an invalid owner")]
24 InvalidOwner,
25 #[error("Invalid account size")]
27 InvalidAccountSize,
28 #[error("Invalid system program account")]
30 InvalidSystemProgramAccount,
31 #[error("Invalid Spl Token program account")]
33 InvalidSplTokenProgramAccount,
34 #[error("Invalid Spl ATA program account")]
36 InvalidSplAtaProgramAccount,
37 #[error("Expired end date")]
39 ExpiredEndDate,
40 #[error("Amount is too low")]
42 AmountTooLow,
43 #[error("Could not add a bid")]
45 AddBidFailed,
46 #[error("NumericalOverflowError")]
48 NumericalOverflow,
49 #[error("Bid account already exists")]
51 BidAccountAlreadyExists,
52 #[error("Invalid account key derivation")]
54 InvalidDerivation,
55 #[error("Bid amount can only increase")]
57 InvalidBidAmount,
58 #[error("Missing bid account")]
60 MissingBidAccount,
61 #[error("Invalid account key value")]
63 InvalidAccountKeyValue,
64 #[error("Auction is in progress")]
66 AuctionInProgress,
67 #[error("Refund not allowed")]
69 RefundNotAllowed,
70 #[error("Account already initialized")]
72 AlreadyInitialized,
73 #[error("Start date is greater or equal to end date")]
75 InvalidStartDate,
76 #[error("Start value lower than minimum value")]
78 InvalidStartValue,
79 #[error("Invalid mint")]
81 InvalidMint,
82 #[error("Auction not started")]
84 AuctionNotStarted,
85 #[error("Auction is live")]
87 AuctionIsLive,
88 #[error("Missing source token account")]
90 MissingSourceTokenAccount,
91 #[error("Missing destination token account")]
93 MissingDestinationTokenAccount,
94 #[error("Missing mint account")]
96 MissingMintAccount,
97 #[error("invalid tick value")]
99 InvalidTickValue,
100 #[error("Invalid auctioneer account")]
102 InvalidAuctioneerAccount,
103 #[error("Invalid auction mode")]
105 InvalidAuctionMode,
106 #[error("Missing payer account")]
108 MissingPayerAccount,
109 #[error("Not a winning bid")]
111 NotWinningBid,
112 #[error("Missing system program account")]
114 MissingSystemProgram,
115 #[error("Bid already settled")]
117 BidAlreadySettled,
118 #[error("Invalid treasury account")]
120 InvalidTreasuryAccount,
121 #[error("Invalid bid owner")]
123 InvalidBidOwner,
124 #[error("Auction account does not match")]
126 MismatchAuction,
127 #[error("Invalid authority")]
129 InvalidAuthority,
130 #[error("Token account does not exist")]
132 TokenAccountDoesNotExist,
133 #[error("Invalid refund fee")]
135 InvalidRefundFee,
136 #[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}