#[repr(C)]pub struct Miner {Show 23 fields
pub authority: Pubkey,
pub deployed: [u64; 25],
pub cumulative: [u64; 25],
pub checkpoint_fee: u64,
pub checkpoint_id: u64,
pub last_claim_oil_at: i64,
pub last_claim_sol_at: i64,
pub rewards_factor: Numeric,
pub rewards_sol: u64,
pub rewards_oil: u64,
pub refined_oil: u64,
pub round_id: u64,
pub pooled_deployed: u64,
pub auction_rewards_oil: u64,
pub auction_rewards_sol: u64,
pub auction_rewards_factor: Numeric,
pub auction_refined_oil: u64,
pub last_claim_auction_oil_at: i64,
pub last_claim_auction_sol_at: i64,
pub lifetime_rewards_sol: u64,
pub lifetime_rewards_oil: u64,
pub lifetime_deployed: u64,
pub referrer: Pubkey,
}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_oil_at: i64The last time this miner claimed OIL 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_oil: u64The amount of OIL this miner can claim.
refined_oil: u64The amount of OIL this miner has earned from claim fees.
round_id: u64The ID of the round this miner last played in.
pooled_deployed: u64The pooled deployed amount of this miner.
auction_rewards_oil: u64OIL rewards from auction wells (not yet claimed) Accumulated when ownership changes (pre-minted) or when claiming current ownership (minted on-demand)
auction_rewards_sol: u64SOL rewards from auction wells (not yet claimed) Includes: outbid refunds, pool refunds from abandoned pools
auction_rewards_factor: NumericThe rewards factor last time auction rewards were updated on this rig account.
auction_refined_oil: u64The amount of OIL this rig has earned from auction claim fees (refined OIL).
last_claim_auction_oil_at: i64The last time this rig claimed OIL rewards.
last_claim_auction_sol_at: i64The last time this rig claimed SOL rewards.
lifetime_rewards_sol: u64The total amount of SOL this miner has mined across all blocks.
lifetime_rewards_oil: u64The total amount of OIL this miner has mined across all blocks.
lifetime_deployed: u64The total amount of OIL this miner has deployed across all rounds.
referrer: PubkeyThe pubkey of the referrer who referred this miner. If this is Pubkey::default(), the miner has no referrer (either old account or no referral used).
Implementations§
Source§impl Miner
impl Miner
pub fn pda(&self) -> (Pubkey, u8)
pub fn claim_oil(&mut self, clock: &Clock, treasury: &mut Treasury) -> u64
pub fn claim_sol(&mut self, clock: &Clock) -> u64
pub fn update_rewards(&mut self, treasury: &Treasury)
pub fn update_auction_rewards(&mut self, treasury: &Treasury)
Trait Implementations§
Source§impl AccountValidation for Miner
impl AccountValidation for Miner
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>
Source§impl<'de> Deserialize<'de> for Miner
impl<'de> Deserialize<'de> for Miner
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 Miner
impl Discriminator for Miner
fn discriminator() -> u8
impl Copy for Miner
impl Pod for Miner
impl StructuralPartialEq for Miner
Auto Trait Implementations§
impl Freeze for Miner
impl RefUnwindSafe for Miner
impl Send for Miner
impl Sync for Miner
impl Unpin for Miner
impl UnwindSafe for Miner
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>
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
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,
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