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