pub struct Treasury {
pub discriminator: [u8; 8],
pub version: u16,
pub bump: u8,
pub protocol_fees_usd_amount: u64,
pub protocol_fees_btc_amount: u64,
pub grubstake_total_usd_amount: u64,
pub grubstake_reserved_usd_amount: u64,
pub grubstake_affiliate_reserved_usd_amount: u64,
pub buybacks_usd_amount: u64,
}Fields§
§discriminator: [u8; 8]§version: u16Struct version.
bump: u8PDA bump seed.
protocol_fees_usd_amount: u64USD protocol fees accrued and not yet withdrawn — the exact withdrawable amount, net of the affiliate share split off at rotation.
protocol_fees_btc_amount: u64BTC swept from no-winner rounds and not yet withdrawn;
grubstake_total_usd_amount: u64USD held for user airdrops (bonus funds for free rounds).
Carved out of reserved, so pre-existing accounts read 0.
grubstake_reserved_usd_amount: u64Portion of the grubstake already promised to users and therefore not
withdrawable. Carved out of reserved, so pre-existing accounts read 0.
grubstake_affiliate_reserved_usd_amount: u64Total unclaimed affiliate grubstake USD: points swept in from closed
rounds (their share of the protocol fee, split off before the fee
joins protocol_fees_usd_amount) and not yet exchanged. Never touched
by fee withdrawals. Carved out of reserved, so pre-existing accounts
read 0.
buybacks_usd_amount: u64USD buybacks fee accrued and not yet withdrawn. Kept apart from
protocol_fees_usd_amount so buyback funds route and report
separately; never touched by withdraw_all. Carved out of
reserved, so pre-existing accounts read 0.
Implementations§
Trait Implementations§
Source§impl BorshDeserialize for Treasury
impl BorshDeserialize for Treasury
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for Treasury
impl BorshSerialize for Treasury
impl Eq for Treasury
impl StructuralPartialEq for Treasury
Auto Trait Implementations§
impl Freeze for Treasury
impl RefUnwindSafe for Treasury
impl Send for Treasury
impl Sync for Treasury
impl Unpin for Treasury
impl UnsafeUnpin for Treasury
impl UnwindSafe for Treasury
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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