#[repr(C)]pub struct Round {Show 19 fields
pub id: u64,
pub deployed: [u64; 25],
pub slot_hash: [u8; 32],
pub count: [u64; 25],
pub expires_at: u64,
pub rent_payer: Pubkey,
pub top_miner: Pubkey,
pub top_miner_reward: u64,
pub total_deployed: u64,
pub total_miners: u64,
pub total_vaulted: u64,
pub total_winnings: u64,
pub gusher_sol: u64,
pub deployed_pooled: [u64; 25],
pub total_pooled: u64,
pub pool_rewards_sol: u64,
pub pool_rewards_oil: u64,
pub pool_members: u64,
pub pool_cumulative: [u64; 25],
}Fields§
§id: u64The round number.
deployed: [u64; 25]The amount of SOL deployed in each square.
slot_hash: [u8; 32]The hash of the end slot, provided by solana, used for random number generation.
count: [u64; 25]The count of miners on each square.
expires_at: u64The slot at which claims for this round account end.
rent_payer: PubkeyThe account to which rent should be returned when this account is closed.
top_miner: PubkeyThe top miner of the round.
top_miner_reward: u64The amount of OIL to distribute to the top miner.
total_deployed: u64The total amount of SOL deployed in the round.
total_miners: u64The total number of unique miners that played in the round.
total_vaulted: u64The total amount of SOL put in the OIL vault.
total_winnings: u64The total amount of SOL won by miners for the round.
gusher_sol: u64The amount of SOL in the gusher.
deployed_pooled: [u64; 25]The amount of pooled SOL deployed in each square.
total_pooled: u64The total amount of pooled SOL deployed in the round.
pool_rewards_sol: u64The SOL rewards allocated to the pool for this round.
pool_rewards_oil: u64The OIL rewards allocated to the pool for this round.
pool_members: u64The number of unique miners who deployed as pooled this round.
pool_cumulative: [u64; 25]The cumulative SOL deployed by solo miners before pool deployed to each square.
Implementations§
Source§impl Round
impl Round
pub fn pda(&self) -> (Pubkey, u8)
pub fn rng(&self) -> Option<u64>
pub fn winning_square(&self, rng: u64) -> usize
pub fn top_miner_sample(&self, rng: u64, winning_square: usize) -> u64
pub fn calculate_total_winnings(&self, winning_square: usize) -> u64
pub fn is_split_reward(&self, rng: u64) -> bool
pub fn did_hit_gusher_sol_only(&self, rng: u64) -> bool
Trait Implementations§
Source§impl AccountValidation for Round
impl AccountValidation for Round
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 Round
impl<'de> Deserialize<'de> for Round
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 Round
impl Discriminator for Round
fn discriminator() -> u8
impl Copy for Round
impl Pod for Round
impl StructuralPartialEq for Round
Auto Trait Implementations§
impl Freeze for Round
impl RefUnwindSafe for Round
impl Send for Round
impl Sync for Round
impl Unpin for Round
impl UnwindSafe for Round
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