stablebond_sdk/generated/errors/
stablebond.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 StablebondError {
13    /// 6000 (0x1770) - Admin does not match admin in config
14    #[error("Admin does not match admin in config")]
15    AdminConfigMismatch,
16    /// 6001 (0x1771) - Admin is not signer
17    #[error("Admin is not signer")]
18    AdminIsNotSigner,
19    /// 6002 (0x1772) - Delegate is not signer
20    #[error("Delegate is not signer")]
21    DelegateIsNotSigner,
22    /// 6003 (0x1773) - User is not signer
23    #[error("User is not signer")]
24    UserIsNotSigner,
25    /// 6004 (0x1774) - Invalid Delegate Address
26    #[error("Invalid Delegate Address")]
27    InvalidDelegateAddress,
28    /// 6005 (0x1775) - Invalid Delegate Owner
29    #[error("Invalid Delegate Owner")]
30    InvalidDelegateOwner,
31    /// 6006 (0x1776) - Invalid Delegate
32    #[error("Invalid Delegate")]
33    InvalidDelegate,
34    /// 6007 (0x1777) - Delegate not initialized
35    #[error("Delegate not initialized")]
36    DelegateNotInitialized,
37    /// 6008 (0x1778) - Delegate already initialized
38    #[error("Delegate already initialized")]
39    DelegateAlreadyInitialized,
40    /// 6009 (0x1779) - Config already initialized
41    #[error("Config already initialized")]
42    ConfigAlreadyInitialized,
43    /// 6010 (0x177A) - Payment already initialized
44    #[error("Payment already initialized")]
45    PaymentAlreadyInitialized,
46    /// 6011 (0x177B) - Payout already initialized
47    #[error("Payout already initialized")]
48    PayoutAlreadyInitialized,
49    /// 6012 (0x177C) - Invalid Config
50    #[error("Invalid Config")]
51    InvalidConfig,
52    /// 6013 (0x177D) - Invalid Config Address
53    #[error("Invalid Config Address")]
54    InvalidConfigAddress,
55    /// 6014 (0x177E) - Invalid Config Owner
56    #[error("Invalid Config Owner")]
57    InvalidConfigOwner,
58    /// 6015 (0x177F) - Mint is not signer
59    #[error("Mint is not signer")]
60    MintIsNotSigner,
61    /// 6016 (0x1780) - Bond not initialized
62    #[error("Bond not initialized")]
63    BondNotInitialized,
64    /// 6017 (0x1781) - Invalid Bond Owner
65    #[error("Invalid Bond Owner")]
66    InvalidBondOwner,
67    /// 6018 (0x1782) - Issuance already initialized
68    #[error("Issuance already initialized")]
69    IssuanceAlreadyInitialized,
70    /// 6019 (0x1783) - Invalid Issuance
71    #[error("Invalid Issuance")]
72    InvalidIssuance,
73    /// 6020 (0x1784) - Invalid Token 2022 Program
74    #[error("Invalid Token 2022 Program")]
75    InvalidToken2022Program,
76    /// 6021 (0x1785) - Invalid Token Program
77    #[error("Invalid Token Program")]
78    InvalidTokenProgram,
79    /// 6022 (0x1786) - Invalid System Program
80    #[error("Invalid System Program")]
81    InvalidSystemProgram,
82    /// 6023 (0x1787) - Invalid interest rate
83    #[error("Invalid interest rate")]
84    InvalidInterestRate,
85    /// 6024 (0x1788) - Invalid mint for bond
86    #[error("Invalid mint for bond")]
87    InvalidMintForBond,
88    /// 6025 (0x1789) - Invalid price feed owner
89    #[error("Invalid price feed owner")]
90    InvalidPriceFeedOwner,
91    /// 6026 (0x178A) - Issuance not initialized
92    #[error("Issuance not initialized")]
93    IssuanceNotInitialized,
94    /// 6027 (0x178B) - Config not initialized
95    #[error("Config not initialized")]
96    ConfigNotInitialized,
97    /// 6028 (0x178C) - Payment not initialized
98    #[error("Payment not initialized")]
99    PaymentNotInitialized,
100    /// 6029 (0x178D) - Payout not initialized
101    #[error("Payout not initialized")]
102    PayoutNotInitialized,
103    /// 6030 (0x178E) - Invalid Payment Address
104    #[error("Invalid Payment Address")]
105    InvalidPaymentAddress,
106    /// 6031 (0x178F) - Invalid Payout Address
107    #[error("Invalid Payout Address")]
108    InvalidPayoutAddress,
109    /// 6032 (0x1790) - Invalid Payout Owner
110    #[error("Invalid Payout Owner")]
111    InvalidPayoutOwner,
112    /// 6033 (0x1791) - Invalid Payment Owner
113    #[error("Invalid Payment Owner")]
114    InvalidPaymentOwner,
115    /// 6034 (0x1792) - Invalid Issuance Owner
116    #[error("Invalid Issuance Owner")]
117    InvalidIssuanceOwner,
118    /// 6035 (0x1793) - Invalid Mint Owner
119    #[error("Invalid Mint Owner")]
120    InvalidMintOwner,
121    /// 6036 (0x1794) - Invalid Issuance Status
122    #[error("Invalid Issuance Status")]
123    InvalidIssuanceStatus,
124    /// 6037 (0x1795) - Invalid Bond Mint
125    #[error("Invalid Bond Mint")]
126    InvalidBondMint,
127    /// 6038 (0x1796) - Invalid Bond Token Account Owner
128    #[error("Invalid Bond Token Account Owner")]
129    InvalidBondTokenAccountOwner,
130    /// 6039 (0x1797) - Invalid Payment Mint
131    #[error("Invalid Payment Mint")]
132    InvalidPaymentMint,
133    /// 6040 (0x1798) - Invalid Payment Token Account Owner
134    #[error("Invalid Payment Token Account Owner")]
135    InvalidPaymentTokenAccountOwner,
136    /// 6041 (0x1799) - Invalid Payment Token Account
137    #[error("Invalid Payment Token Account")]
138    InvalidPaymentTokenAccount,
139    /// 6042 (0x179A) - Invalid Amount
140    #[error("Invalid Amount")]
141    InvalidAmount,
142    /// 6043 (0x179B) - Oracle Not Configured
143    #[error("Oracle Not Configured")]
144    OracleNotConfigured,
145    /// 6044 (0x179C) - Invalid Oracle
146    #[error("Invalid Oracle")]
147    InvalidOracleAccount,
148    /// 6045 (0x179D) - Unsupported Oracle
149    #[error("Unsupported Oracle")]
150    UnsupportedOracle,
151    /// 6046 (0x179E) - Stale Oracle
152    #[error("Stale Oracle")]
153    StaleOracle,
154    /// 6047 (0x179F) - Math Overflow
155    #[error("Math Overflow")]
156    MathOverflow,
157    /// 6048 (0x17A0) - Unable To Get Clock
158    #[error("Unable To Get Clock")]
159    UnableToGetClock,
160    /// 6049 (0x17A1) - Not Enough Liquidity
161    #[error("Not Enough Liquidity")]
162    NotEnoughLiquidity,
163    /// 6050 (0x17A2) - IssuancePastCutoffTime
164    #[error("IssuancePastCutoffTime")]
165    IssuancePastCutoffTime,
166    /// 6051 (0x17A3) - Issuance Not Started
167    #[error("Issuance Not Started")]
168    IssuanceNotStarted,
169    /// 6052 (0x17A4) - Invalid NFT Issuance Vault Owner
170    #[error("Invalid NFT Issuance Vault Owner")]
171    InvalidNftIssuanceVaultOwner,
172    /// 6053 (0x17A5) - Invalid NFT Issuance Vault
173    #[error("Invalid NFT Issuance Vault")]
174    InvalidNftIssuanceVault,
175    /// 6054 (0x17A6) - Failed To Create Nft Collection
176    #[error("Failed To Create Nft Collection")]
177    FailedToCreateNftCollection,
178    /// 6055 (0x17A7) - No Redemptions Requested
179    #[error("No Redemptions Requested")]
180    NoRedemptionsRequested,
181    /// 6056 (0x17A8) - Invalide Price Feed Account
182    #[error("Invalide Price Feed Account")]
183    InvalidPriceFeedAccount,
184    /// 6057 (0x17A9) - PaymentFeed Not Initialized
185    #[error("PaymentFeed Not Initialized")]
186    PaymentFeedNotInitialized,
187    /// 6058 (0x17AA) - Invalid Payment Feed
188    #[error("Invalid Payment Feed")]
189    InvalidPaymentFeed,
190    /// 6059 (0x17AB) - Invalid Account
191    #[error("Invalid Account")]
192    InvalidAccount,
193    /// 6060 (0x17AC) - Issuance Not Ready To Start
194    #[error("Issuance Not Ready To Start")]
195    IssuanceNotReadyToStart,
196    /// 6061 (0x17AD) - Invalid Admin Account
197    #[error("Invalid Admin Account")]
198    InvalidAdminAccount,
199    /// 6062 (0x17AE) - Invalid Config Account
200    #[error("Invalid Config Account")]
201    InvalidConfigAccount,
202    /// 6063 (0x17AF) - Invalid Delegate Account
203    #[error("Invalid Delegate Account")]
204    InvalidDelegateAccount,
205    /// 6064 (0x17B0) - Invalid Bond Account
206    #[error("Invalid Bond Account")]
207    InvalidBondAccount,
208    /// 6065 (0x17B1) - Invalid Issuance Account
209    #[error("Invalid Issuance Account")]
210    InvalidIssuanceAccount,
211    /// 6066 (0x17B2) - Invalid Payment Account
212    #[error("Invalid Payment Account")]
213    InvalidPaymentAccount,
214    /// 6067 (0x17B3) - Invalid Payout Account
215    #[error("Invalid Payout Account")]
216    InvalidPayoutAccount,
217    /// 6068 (0x17B4) - Invalid Argument
218    #[error("Invalid Argument")]
219    InvalidArgument,
220    /// 6069 (0x17B5) - Invalid Price
221    #[error("Invalid Price")]
222    InvalidPrice,
223    /// 6070 (0x17B6) - Invalid Payment Feed Owner
224    #[error("Invalid Payment Feed Owner")]
225    InvalidPaymentFeedOwner,
226    /// 6071 (0x17B7) - Invalid Payment Feed Account
227    #[error("Invalid Payment Feed Account")]
228    InvalidPaymentFeedAccount,
229    /// 6072 (0x17B8) - Purchase Order Not Initialized
230    #[error("Purchase Order Not Initialized")]
231    PurchaseOrderNotInitialized,
232    /// 6073 (0x17B9) - Invalid User NFT Token Account Owner
233    #[error("Invalid User NFT Token Account Owner")]
234    InvalidUserNftTokenAccountOwner,
235    /// 6074 (0x17BA) - Invalid Purchase Order Status
236    #[error("Invalid Purchase Order Status")]
237    InvalidPurchaseOrderStatus,
238    /// 6075 (0x17BB) - Invalid Purchase Order
239    #[error("Invalid Purchase Order")]
240    InvalidPurchaseOrder,
241    /// 6076 (0x17BC) - Invalid Purchase Order Account Owner
242    #[error("Invalid Purchase Order Account Owner")]
243    InvalidPurchaseOrderAccountOwner,
244    /// 6077 (0x17BD) - Issuance Not Matured
245    #[error("Issuance Not Matured")]
246    IssuanceNotMatured,
247    /// 6078 (0x17BE) - Invalid User Payment Token Account Owner
248    #[error("Invalid User Payment Token Account Owner")]
249    InvalidUserPaymentTokenAccountOwner,
250    /// 6079 (0x17BF) - Invalid Nft Collection
251    #[error("Invalid Nft Collection")]
252    InvalidNftCollection,
253    /// 6080 (0x17C0) - Current Issuance Not Over
254    #[error("Current Issuance Not Over")]
255    CurrentIssuanceNotOver,
256    /// 6081 (0x17C1) - Account Is Not Writeable
257    #[error("Account Is Not Writeable")]
258    AccountIsNotWriteable,
259    /// 6082 (0x17C2) - Price feed exceeded provided confidence interval
260    #[error("Price feed exceeded provided confidence interval")]
261    ConfidenceIntervalExceeded,
262    /// 6083 (0x17C3) - Price feed has invalid confidence interval
263    #[error("Price feed has invalid confidence interval")]
264    InvalidConfidenceInterval,
265    /// 6084 (0x17C4) - Past Issuance Cutoff Time
266    #[error("Past Issuance Cutoff Time")]
267    PastIssuanceCutoffTime,
268    /// 6085 (0x17C5) - Invalid Kyc Account
269    #[error("Invalid Kyc Account")]
270    InvalidKycAccount,
271    /// 6086 (0x17C6) - Kyc Not Initialized
272    #[error("Kyc Not Initialized")]
273    KycNotInitialized,
274    /// 6087 (0x17C7) - Sell Liquidity Already Initialized
275    #[error("Sell Liquidity Already Initialized")]
276    SellLiquidityAlreadyInitialized,
277    /// 6088 (0x17C8) - Insufficient Liquidity
278    #[error("Insufficient Liquidity")]
279    InsufficientLiquidity,
280    /// 6089 (0x17C9) - Invalid Offramp Account
281    #[error("Invalid Offramp Account")]
282    InvalidOfframpAccount,
283    /// 6090 (0x17CA) - Offramp Not Initialized
284    #[error("Offramp Not Initialized")]
285    OfframpNotInitialized,
286    /// 6091 (0x17CB) - Invalid Onramp Account
287    #[error("Invalid Onramp Account")]
288    InvalidOnrampAccount,
289    /// 6092 (0x17CC) - Onramp Not Initialized
290    #[error("Onramp Not Initialized")]
291    OnrampNotInitialized,
292    /// 6093 (0x17CD) - Invalid Sequence Account
293    #[error("Invalid Sequence Account")]
294    InvalidSequenceAccount,
295    /// 6094 (0x17CE) - Sequence Not Initialized
296    #[error("Sequence Not Initialized")]
297    SequenceNotInitialized,
298    /// 6095 (0x17CF) - Invalid Offramp Status
299    #[error("Invalid Offramp Status")]
300    InvalidOfframpStatus,
301    /// 6096 (0x17D0) - Multisig Required
302    #[error("Multisig Required")]
303    MultisigRequired,
304    /// 6097 (0x17D1) - Failed to create mint instruction
305    #[error("Failed to create mint instruction")]
306    FailedToCreateMintInstruction,
307    /// 6098 (0x17D2) - Bond Multisig Meta Not Initialized
308    #[error("Bond Multisig Meta Not Initialized")]
309    BondMultisigMetaNotInitialized,
310}
311
312impl solana_program::program_error::PrintProgramError for StablebondError {
313    fn print<E>(&self) {
314        solana_program::msg!(&self.to_string());
315    }
316}