This commit is contained in:
Hardhat Chad
2025-06-04 15:13:44 -07:00
parent 79a9ac3b40
commit fa1fb5e30c
28 changed files with 341 additions and 4167 deletions

30
api/src/state/miner.rs Normal file
View File

@@ -0,0 +1,30 @@
use steel::*;
use super::OreAccount;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
pub struct Miner {
/// The authority of this miner account.
pub authority: Pubkey,
/// The ID of the last block this miner mined in.
pub block_id: u64,
/// The amount of ORE this miner can deploy into hashpower markets.
pub capacity: u64,
/// The hash of the last block this miner mined in.
pub hash: [u8; 32],
/// The amount of ORE this miner has staked.
pub stake: u64,
/// The total number of hashes this miner has submitted.
pub total_hashes: u64,
/// The amount of ORE this miner has mined.
pub total_rewards: u64,
}
account!(OreAccount, Miner);