#[repr(C)]pub struct Treasury {
pub admin: Pubkey,
pub bump: u64,
pub difficulty: Hash,
pub last_reset_at: i64,
pub reward_rate: u64,
pub total_claimed_rewards: u64,
}
Expand description
Treasury is a singleton account which manages all program wide variables. It is the mint authority for the Ore token and also the authority of the program-owned token account.
Fields§
§admin: Pubkey
The admin authority with permission to update the difficulty.
bump: u64
The bump of the treasury account PDA, for signing CPIs.
difficulty: Hash
The hash difficulty.
last_reset_at: i64
The timestamp of the reset invocation.
reward_rate: u64
The reward rate to payout to miners for submiting valid hashes.
total_claimed_rewards: u64
The total lifetime claimed rewards.
Implementations§
Trait Implementations§
Source§impl AccountDeserialize for Treasury
impl AccountDeserialize for Treasury
fn try_from_bytes(data: &[u8]) -> Result<&Self, ProgramError>
fn try_from_bytes_mut(data: &mut [u8]) -> Result<&mut Self, ProgramError>
Source§impl Discriminator for Treasury
impl Discriminator for Treasury
impl Copy for Treasury
impl Pod 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 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
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.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>
Converts
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>
Converts
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