This commit is contained in:
Hardhat Chad
2025-05-26 10:13:58 -07:00
parent 3049c1b390
commit 2196978c66
10 changed files with 43 additions and 42 deletions

View File

@@ -1,13 +1,5 @@
use steel::*;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
pub struct PayoutEvent {
pub authority: Pubkey,
pub amount: u64,
pub ts: u64,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
pub struct BetEvent {
@@ -23,6 +15,14 @@ pub struct BuryEvent {
pub ts: u64,
}
event!(PayoutEvent);
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
pub struct PayoutEvent {
pub authority: Pubkey,
pub amount: u64,
pub ts: u64,
}
event!(BetEvent);
event!(BuryEvent);
event!(PayoutEvent);

View File

@@ -5,8 +5,8 @@ use super::OreAccount;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
pub struct Block {
/// The number of bets made in the current round.
pub bet_count: u64,
/// The cumulative amount risked in the current round.
pub cumulative_sum: u64,
/// The current round.
pub current_round: u64,
@@ -14,23 +14,23 @@ pub struct Block {
/// The slot at which the current round ends.
pub ends_at: u64,
/// The mint used to track wagers of the current round.
/// The mint used for wagers of the current round.
pub mint: Pubkey,
/// The noise used for the current round.
/// The noise used for the current round for provably fair randomness.
pub noise: [u8; 32],
/// Whether or not the current round has ended.
/// Whether or not the current round has paid out.
pub payed_out: u64,
/// The amount of ORE to distribute to the winner.
pub reward: u64,
/// The time time the current round started.
/// The time the current round started at.
pub started_at: u64,
/// The cumulative amount of SOL risked in the current round, up to and including this bet.
pub total_bets: u64,
/// The number of wagers made in the current round.
pub total_wagers: u64,
}
account!(OreAccount, Block);

View File

@@ -11,8 +11,8 @@ pub struct Wager {
/// The signer authorized to use this wager.
pub authority: Pubkey,
/// The cumulative amount of SOL bet in the current round, up to and including this wager.
pub cumulative_bets: u64,
/// The cumulative amount risked in the current round, up to and including this wager.
pub cumulative_sum: u64,
/// The current round this miner is betting in.
pub round: u64,