#[repr(C)]pub struct MinerV4 {Show 17 fields
pub authority: Pubkey,
pub auto_return: u64,
pub checkpoint_id: u64,
pub checkpoint_fee: u64,
pub sol: [u64; 25],
pub mass: [u64; 25],
pub mass_cumulative: [u64; 25],
pub round_id: u64,
pub rewards_factor: Numeric,
pub sol_returned: u64,
pub ore_refined: u64,
pub ore_unrefined: u64,
pub last_claim_ore_at: i64,
pub last_claim_sol_at: i64,
pub lifetime_rewards: u64,
pub lifetime_deployed: u64,
pub lifetime_returned_sol: u64,
}Fields§
The authority of this miner account.
auto_return: u64Whether or not to auto-return SOL winnings to the miner’s wallet.
checkpoint_id: u64The checkpoint ID.
checkpoint_fee: u64SOL witheld in reserve to pay for checkpointing.
sol: [u64; 25]The amount of SOL deployed on each square.
mass: [u64; 25]The amount of SOL deployed on each square, weighted by the time remaining when deployed.
mass_cumulative: [u64; 25]The cumulative mass on each square prior to this miner’s deployment on that square.
round_id: u64The round ID.
rewards_factor: NumericThe rewards factor last time rewards were updated on this miner account.
sol_returned: u64The amount of SOL this miner has had returned and may claim.
ore_refined: u64The amount of ORE this miner has earned from refining fees and may claim.
ore_unrefined: u64The amount of ORE this miner has mined and may claim.
last_claim_ore_at: i64The last time this miner claimed ORE rewards.
last_claim_sol_at: i64The last time this miner claimed SOL rewards.
lifetime_rewards: u64The total amount of ORE this miner has mined across all blocks.
lifetime_deployed: u64The total amount of SOL this miner has deployed across all rounds.
lifetime_returned_sol: u64The total amount of SOL this miner has mined across all blocks.
Implementations§
Source§impl MinerV4
impl MinerV4
pub fn pda(&self) -> (Pubkey, u8)
pub fn claim_ore_v1(&mut self, clock: &Clock, treasury: &mut TreasuryV1) -> u64
pub fn claim_ore_v4(&mut self, clock: &Clock, treasury: &mut TreasuryV4) -> u64
pub fn claim_sol(&mut self, clock: &Clock) -> u64
pub fn update_rewards_v4(&mut self, treasury: &TreasuryV4)
pub fn update_rewards_v1(&mut self, treasury: &TreasuryV1)
Trait Implementations§
Source§impl AccountValidation for MinerV4
impl AccountValidation for MinerV4
fn assert<F>(&self, condition: F) -> Result<&Self, ProgramError>
fn assert_err<F>( &self, condition: F, err: ProgramError, ) -> Result<&Self, ProgramError>
fn assert_msg<F>(&self, condition: F, msg: &str) -> Result<&Self, ProgramError>
fn assert_mut<F>(&mut self, condition: F) -> Result<&mut Self, ProgramError>
fn assert_mut_err<F>( &mut self, condition: F, err: ProgramError, ) -> Result<&mut Self, ProgramError>
fn assert_mut_msg<F>( &mut self, condition: F, msg: &str, ) -> Result<&mut Self, ProgramError>
impl Copy for MinerV4
Source§impl<'de> Deserialize<'de> for MinerV4
impl<'de> Deserialize<'de> for MinerV4
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Discriminator for MinerV4
impl Discriminator for MinerV4
fn discriminator() -> u8
impl Pod for MinerV4
impl StructuralPartialEq for MinerV4
Auto Trait Implementations§
impl Freeze for MinerV4
impl RefUnwindSafe for MinerV4
impl Send for MinerV4
impl Sync for MinerV4
impl Unpin for MinerV4
impl UnsafeUnpin for MinerV4
impl UnwindSafe for MinerV4
Blanket Implementations§
Source§impl<T> AccountDeserialize for Twhere
T: Discriminator + Pod,
impl<T> AccountDeserialize for Twhere
T: Discriminator + Pod,
fn try_from_bytes(data: &[u8]) -> Result<&T, ProgramError>
fn try_from_bytes_mut(data: &mut [u8]) -> Result<&mut T, ProgramError>
Source§impl<T> AccountHeaderDeserialize for Twhere
T: Discriminator + Pod,
impl<T> AccountHeaderDeserialize for Twhere
T: Discriminator + Pod,
fn try_header_from_bytes(data: &[u8]) -> Result<(&T, &[u8]), ProgramError>
fn try_header_from_bytes_mut( data: &mut [u8], ) -> Result<(&mut T, &mut [u8]), ProgramError>
impl<T> AnyBitPattern for Twhere
T: Pod,
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> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
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
bits
as &Self.Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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