use anchor_lang::error_code;
#[error_code]
pub enum ErrorCode {
#[msg("CLP is unknown")]
UnknownClp, #[msg("TokenAMint does not match underlying CLP")]
MintAClpMismatch, #[msg("TokenBMint does not match underlying CLP")]
MintBClpMismatch, #[msg("PositionBundle was already created")]
PositionBundleAlreadyCreated, #[msg("Max positions exceeded")]
MaxPositionsExceeded, #[msg("Position exists at index")]
PositionExistsAtIndex, #[msg("Market maker must sign for this instruction")]
MarketMakerMustSign, #[msg("CLP does not match the ClpVault state")]
ClpMismatch, #[msg("Max active positions greater than 1")]
MaxActivePositonsNotOne, #[msg("VaultPosition liquidity should be 0 when supply is 0")]
VaultPositionLiquidityIssue, #[msg("Max token amount exceeded")]
MaxTokenAmountExceeded, #[msg("Position bundle token account does not match ClpVault")]
PositionBundleTokenAccountMismatch, #[msg("Position accounts do not match vault position at correct index")]
PositionAccountsDoNotMatch, #[msg("Token Vault A does not match ClpVault")]
TokenVaultAMismatch, #[msg("Token Vault B does not match ClpVault")]
TokenVaultBMismatch, #[msg("LP mint does not match ClpVault")]
LpMintMismatch, #[msg("Remaining accounts is missing the VaultPositions")]
RemainingAccountsMissingVaultPositions, #[msg("Expected minimum tokens not returned")]
MinimumTokensNotReturned, #[msg("Incorrect admin key")]
InccorectAdminKey, #[msg("Fee account is not owned by fee_owner")]
IncorrectFeeOwner, #[msg("Failed to deserialize position at that key")]
UnknownPosition, #[msg("MM fee account is not owned by market_making_key")]
IncorrectMMFeeOwner, #[msg("Metadata deserialization failed")]
MetadataDeserializationFailed, #[msg("Clp program does not own clp")]
AccountMustBeOwnedByClpProgram, }