#[repr(C)]pub struct AuctionData {
pub authority: Pubkey,
pub token_mint: Pubkey,
pub last_bid: Option<UnixTimestamp>,
pub ended_at: Option<UnixTimestamp>,
pub end_auction_at: Option<UnixTimestamp>,
pub end_auction_gap: Option<UnixTimestamp>,
pub price_floor: PriceFloor,
pub state: AuctionState,
pub bid_state: BidState,
}Fields§
Pubkey of the authority with permission to modify this auction.
token_mint: PubkeyPubkey of the resource being bid on. TODO try to bring this back some day. Had to remove this due to a stack access violation bug interactin that happens in metaplex during redemptions due to some low level rust error that happens when AuctionData has too many fields. This field was the least used. pub resource: Pubkey, Token mint for the SPL token being used to bid
last_bid: Option<UnixTimestamp>The time the last bid was placed, used to keep track of auction timing.
ended_at: Option<UnixTimestamp>Slot time the auction was officially ended by.
end_auction_at: Option<UnixTimestamp>End time is the cut-off point that the auction is forced to end by.
end_auction_gap: Option<UnixTimestamp>Gap time is the amount of time in slots after the previous bid at which the auction ends.
price_floor: PriceFloorMinimum price for any bid to meet.
state: AuctionStateThe state the auction is in, whether it has started or ended.
bid_state: BidStateAuction Bids, each user may have one bid open at a time.
Implementations§
Source§impl AuctionData
impl AuctionData
pub fn get_token_mint(a: &AccountInfo<'_>) -> Pubkey
pub fn get_state(a: &AccountInfo<'_>) -> Result<AuctionState, ProgramError>
pub fn get_num_winners(a: &AccountInfo<'_>) -> usize
pub fn get_is_winner(a: &AccountInfo<'_>, key: &Pubkey) -> Option<usize>
pub fn get_winner_at(a: &AccountInfo<'_>, idx: usize) -> Option<Pubkey>
pub fn get_winner_bid_amount_at(a: &AccountInfo<'_>, idx: usize) -> Option<u64>
pub fn from_account_info( a: &AccountInfo<'_>, ) -> Result<AuctionData, ProgramError>
pub fn ended(&self, now: UnixTimestamp) -> Result<bool, ProgramError>
pub fn is_winner(&self, key: &Pubkey) -> Option<usize>
pub fn num_winners(&self) -> u64
pub fn num_possible_winners(&self) -> u64
pub fn winner_at(&self, idx: usize) -> Option<Pubkey>
pub fn consider_instant_bid(&mut self, instant_sale_price: Option<u64>)
pub fn place_bid( &mut self, bid: Bid, tick_size: Option<u64>, gap_tick_size_percentage: Option<u8>, now: UnixTimestamp, instant_sale_price: Option<u64>, ) -> Result<(), ProgramError>
Trait Implementations§
Source§impl BorshDeserialize for AuctionData
impl BorshDeserialize for AuctionData
Source§impl BorshSerialize for AuctionData
impl BorshSerialize for AuctionData
Source§impl Clone for AuctionData
impl Clone for AuctionData
Source§fn clone(&self) -> AuctionData
fn clone(&self) -> AuctionData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AuctionData
impl Debug for AuctionData
Source§impl PartialEq for AuctionData
impl PartialEq for AuctionData
impl StructuralPartialEq for AuctionData
Auto Trait Implementations§
impl Freeze for AuctionData
impl RefUnwindSafe for AuctionData
impl Send for AuctionData
impl Sync for AuctionData
impl Unpin for AuctionData
impl UnwindSafe for AuctionData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more