sdk, miner

This commit is contained in:
Hardhat Chad
2025-07-18 14:25:57 -07:00
parent c02551b032
commit 870796400c
9 changed files with 196 additions and 25 deletions

View File

@@ -13,9 +13,6 @@ pub struct Miner {
/// The ID of the last block this miner mined in.
pub block_id: u64,
/// The hash of the last block this miner mined in.
pub hash: [u8; 32],
/// The amount of hashpower this miner has committed to the current block.
pub hashpower: u64,

View File

@@ -55,3 +55,7 @@ pub fn vault_pda() -> (Pubkey, u8) {
pub fn treasury_pda() -> (Pubkey, u8) {
Pubkey::find_program_address(&[TREASURY], &crate::ID)
}
pub fn treasury_tokens_address() -> Pubkey {
spl_associated_token_account::get_associated_token_address(&TREASURY_ADDRESS, &MINT_ADDRESS)
}