This commit is contained in:
Hardhat Chad
2025-10-02 11:49:35 -07:00
parent c745ed19e9
commit eb40335fa3
16 changed files with 3798 additions and 247 deletions

View File

@@ -1,6 +1,6 @@
use steel::*;
use crate::state::board_pda;
use crate::state::{board_pda, OreAccountOLD};
use super::OreAccount;
@@ -17,6 +17,40 @@ pub struct Board {
pub end_slot: u64,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
pub struct BoardOLD {
/// The round number.
pub id: u64,
/// The deployed SOL for the round.
pub deployed: [u64; 25],
/// The timestamp at which the block starts mining.
pub start_at: i64,
/// The slot at which the block starts trading.
pub start_slot: u64,
/// The slot at which the block ends trading.
pub end_slot: u64,
/// The hash of the end slot, provided by solana, used for random number generation.
pub slot_hash: [u8; 32],
/// The top miner of the round.
pub top_miner: Pubkey,
/// The total amount of SOL deployed in the round.
pub total_deployed: u64,
/// The total amount of SOL put in the ORE vault.
pub total_vaulted: u64,
/// The total amount of SOL won by miners for the round.
pub total_winnings: u64,
}
impl Board {
pub fn pda(&self) -> (Pubkey, u8) {
board_pda()
@@ -24,3 +58,4 @@ impl Board {
}
account!(OreAccount, Board);
account!(OreAccountOLD, BoardOLD);