pub struct Round {Show 17 fields
pub status: RoundStatus,
pub bid_mint: Pubkey,
pub offer_mint: Pubkey,
pub heir: Pubkey,
pub recipient: Pubkey,
pub payer: Pubkey,
pub vouchers_count: u64,
pub created_at: i64,
pub bidding_start: i64,
pub bidding_end: i64,
pub total_bid: Option<u64>,
pub total_offer: Option<u64>,
pub target_bid: u64,
pub return_wallet: Pubkey,
pub reserved1: [u8; 24],
pub reserved2: Pubkey,
pub reserved3: Pubkey,
}Fields§
§status: RoundStatuscurrent offer status
bid_mint: Pubkeyusers offering token (typically wSOL) this is embedded in the account to avoid extra lookups and emit it in events
offer_mint: Pubkeycreator offering token
heir: Pubkeyaccount that can accept/reject bid
recipient: Pubkeyaccount that receives bid in case of accept
payer: Pubkeyaccount to refund SOL from closing this account
vouchers_count: u64number of vouchers issued (we can’t close account until everybody withdraws)
created_at: i64the moment round was created
bidding_start: i64§bidding_end: i64§total_bid: Option<u64>total bid balance when drop was accepted. Used for calculations
total_offer: Option<u64>total offer balance when drop was accepted. Used for calculations
target_bid: u64§return_wallet: Pubkey§reserved1: [u8; 24]§reserved2: Pubkey§reserved3: PubkeyImplementations§
source§impl Round
impl Round
pub fn assert_can_accept_or_reject(&self, now: UnixTimestamp) -> Result<()>
pub fn assert_can_contribute(&self, now: UnixTimestamp) -> Result<()>
pub fn assert_can_withdraw( &self, now: UnixTimestamp, user_is_signer: bool ) -> Result<()>
pub fn assert_can_redeem(&self) -> Result<()>
pub fn assert_can_cancel(&self, now: UnixTimestamp) -> Result<()>
pub fn assert_can_close(&self, now: UnixTimestamp) -> Result<()>
Trait Implementations§
source§impl AccountDeserialize for Round
impl AccountDeserialize for Round
source§fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
Deserializes previously initialized account data. Should fail for all
uninitialized accounts, where the bytes are zeroed. Implementations
should be unique to a particular account type so that one can never
successfully deserialize the data of one account type into another.
For example, if the SPL token program were to implement this trait,
it should be impossible to deserialize a
Mint account into a token
Account.source§fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
Deserializes account data without checking the account discriminator.
This should only be used on account initialization, when the bytes of
the account are zeroed.
source§impl AccountSerialize for Round
impl AccountSerialize for Round
source§impl BorshDeserialize for Roundwhere
RoundStatus: BorshDeserialize,
Pubkey: BorshDeserialize,
u64: BorshDeserialize,
i64: BorshDeserialize,
Option<u64>: BorshDeserialize,
[u8; 24]: BorshDeserialize,
impl BorshDeserialize for Roundwhere RoundStatus: BorshDeserialize, Pubkey: BorshDeserialize, u64: BorshDeserialize, i64: BorshDeserialize, Option<u64>: BorshDeserialize, [u8; 24]: BorshDeserialize,
source§impl BorshSerialize for Roundwhere
RoundStatus: BorshSerialize,
Pubkey: BorshSerialize,
u64: BorshSerialize,
i64: BorshSerialize,
Option<u64>: BorshSerialize,
[u8; 24]: BorshSerialize,
impl BorshSerialize for Roundwhere RoundStatus: BorshSerialize, Pubkey: BorshSerialize, u64: BorshSerialize, i64: BorshSerialize, Option<u64>: BorshSerialize, [u8; 24]: BorshSerialize,
source§impl Discriminator for Round
impl Discriminator for Round
const DISCRIMINATOR: [u8; 8] = _
fn discriminator() -> [u8; 8]
Auto Trait Implementations§
impl RefUnwindSafe for Round
impl Send for Round
impl Sync for Round
impl Unpin for Round
impl UnwindSafe for Round
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
Mutably borrows from an owned value. Read more