#[repr(C)]pub struct MinerV1 {Show 15 fields
pub authority: Pubkey,
pub deployed: [u64; 25],
pub cumulative: [u64; 25],
pub checkpoint_fee: u64,
pub checkpoint_id: u64,
pub last_claim_ore_at: i64,
pub last_claim_sol_at: i64,
pub rewards_factor: Numeric,
pub rewards_sol: u64,
pub rewards_ore: u64,
pub refined_ore: u64,
pub round_id: u64,
pub lifetime_rewards_sol: u64,
pub lifetime_rewards_ore: u64,
pub lifetime_deployed: u64,
}Fields§
The authority of this miner account.
deployed: [u64; 25]The miner’s prospects in the current round.
cumulative: [u64; 25]The cumulative amount of SOL deployed on each square prior to this miner’s move.
checkpoint_fee: u64SOL witheld in reserve to pay for checkpointing.
checkpoint_id: u64The last round that this miner checkpointed.
last_claim_ore_at: i64The last time this miner claimed ORE rewards.
last_claim_sol_at: i64The last time this miner claimed SOL rewards.
rewards_factor: NumericThe rewards factor last time rewards were updated on this miner account.
rewards_sol: u64The amount of SOL this miner can claim.
rewards_ore: u64The amount of ORE this miner can claim.
refined_ore: u64The amount of ORE this miner has earned from claim fees.
round_id: u64The ID of the round this miner last played in.
lifetime_rewards_sol: u64The total amount of SOL this miner has mined across all blocks.
lifetime_rewards_ore: 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.
Implementations§
Source§impl MinerV1
impl MinerV1
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_v1(&mut self, treasury: &TreasuryV1)
pub fn update_rewards_v4(&mut self, treasury: &TreasuryV4)
Trait Implementations§
Source§impl AccountValidation for MinerV1
impl AccountValidation for MinerV1
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 MinerV1
Source§impl<'de> Deserialize<'de> for MinerV1
impl<'de> Deserialize<'de> for MinerV1
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 MinerV1
impl Discriminator for MinerV1
fn discriminator() -> u8
impl Pod for MinerV1
impl StructuralPartialEq for MinerV1
Auto Trait Implementations§
impl Freeze for MinerV1
impl RefUnwindSafe for MinerV1
impl Send for MinerV1
impl Sync for MinerV1
impl Unpin for MinerV1
impl UnsafeUnpin for MinerV1
impl UnwindSafe for MinerV1
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