mallow-auction-client 0.2.0

Codama-generated Rust client for the mallow_auction Anchor program.
Documentation
//! This code was AUTOGENERATED using the codama library.
//! Please DO NOT EDIT THIS FILE, instead use visitors
//! to add features, then rerun codama to update it.
//!
//! <https://github.com/codama-idl/codama>
//!

use num_derive::FromPrimitive;
use thiserror::Error;

#[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)]
pub enum MallowAuctionError {
    /// 6000 - Bump seed not in hash map
    #[error("Bump seed not in hash map")]
    BumpSeedNotInHashMap = 0x1770,
    /// 6001 - Invalid start/end date
    #[error("Invalid start/end date")]
    InvalidDates = 0x1771,
    /// 6002 - Auction has a bid
    #[error("Auction has a bid")]
    AuctionHasBid = 0x1772,
    /// 6003 - Auction has no bid
    #[error("Auction has no bid")]
    AuctionHasNoBid = 0x1773,
    /// 6004 - Auction has not started
    #[error("Auction has not started")]
    AuctionNotStarted = 0x1774,
    /// 6005 - Auction has ended
    #[error("Auction has ended")]
    AuctionEnded = 0x1775,
    /// 6006 - Auction has not ended
    #[error("Auction has not ended")]
    AuctionNotEnded = 0x1776,
    /// 6007 - Bid too low
    #[error("Bid too low")]
    BidTooLow = 0x1777,
    /// 6008 - Invalid bidder
    #[error("Invalid bidder")]
    InvalidBidder = 0x1778,
    /// 6009 - Creator not found
    #[error("Creator not found")]
    CreatorNotFound = 0x1779,
    /// 6010 - Invalid royalty
    #[error("Invalid royalty")]
    InvalidRoyalty = 0x177A,
    /// 6011 - Associated token address not found
    #[error("Associated token address not found")]
    ATANotFound = 0x177B,
    /// 6012 - Invalid bid mint token account
    #[error("Invalid bid mint token account")]
    InvalidBidMintTokenAccount = 0x177C,
    /// 6013 - Invalid auction config bid token account
    #[error("Invalid auction config bid token account")]
    InvalidAuctionConfigBidTokenAccount = 0x177D,
    /// 6014 - Invalid reduced fee whitelist account
    #[error("Invalid reduced fee whitelist account")]
    InvalidFeeSchedule = 0x177E,
    /// 6015 - Invalid metadata account
    #[error("Invalid metadata account")]
    InvalidMetadataAccount = 0x177F,
    /// 6016 - Invalid argument
    #[error("Invalid argument")]
    InvalidArg = 0x1780,
    /// 6017 - Invalid payee shares
    #[error("Invalid payee shares")]
    InvalidPayeeShares = 0x1781,
    /// 6018 - Invalid bid mint
    #[error("Invalid bid mint")]
    InvalidBidMint = 0x1782,
    /// 6019 - Invalid PDA transfer source
    #[error("Invalid PDA transfer source")]
    InvalidPDATransferSource = 0x1783,
    /// 6020 - Invalid PDA transfer destination
    #[error("Invalid PDA transfer destination")]
    InvalidPDATransferDestination = 0x1784,
    /// 6021 - Invalid public key
    #[error("Invalid public key")]
    PublicKeyMismatch = 0x1785,
    /// 6022 - Incorrect owner
    #[error("Incorrect owner")]
    IncorrectOwner = 0x1786,
    /// 6023 - Account not initialized
    #[error("Account not initialized")]
    UninitializedAccount = 0x1787,
    /// 6024 - Invalid duration
    #[error("Invalid duration")]
    InvalidDuration = 0x1788,
    /// 6025 - Invalid reserve price
    #[error("Invalid reserve price")]
    InvalidReservePrice = 0x1789,
    /// 6026 - Invalid authority
    #[error("Invalid authority")]
    InvalidAuthority = 0x178A,
    /// 6027 - Invalid fee account
    #[error("Invalid fee account")]
    InvalidFeeAccount = 0x178B,
    /// 6028 - Auction is paused
    #[error("Auction is paused")]
    AuctionPaused = 0x178C,
    /// 6029 - Wrong ix type for settle
    #[error("Wrong ix type for settle")]
    WrongSettleIx = 0x178D,
    /// 6030 - Already acknowledged
    #[error("Already acknowledged")]
    AlreadyAcknowledged = 0x178E,
    /// 6031 - Invalid marketplace authority
    #[error("Invalid marketplace authority")]
    InvalidMarketplaceAuthority = 0x178F,
    /// 6032 - Cannot burn on complete
    #[error("Cannot burn on complete")]
    InvalidBurnOnComplete = 0x1790,
    /// 6033 - Invalid payer
    #[error("Invalid payer")]
    InvalidPayer = 0x1791,
}

impl From<MallowAuctionError> for solana_program_error::ProgramError {
    fn from(e: MallowAuctionError) -> Self {
        solana_program_error::ProgramError::Custom(e as u32)
    }
}