This commit is contained in:
Hardhat Chad
2025-10-01 18:46:49 -07:00
parent 236f166913
commit c745ed19e9
8 changed files with 75 additions and 17 deletions

View File

@@ -307,6 +307,28 @@ pub fn reset(
data: Reset {}.to_bytes(),
}
}
// let [signer_info, automation_info, board_info, miner_info, round_info, treasury_info, system_program] =
pub fn checkpoint(signer: Pubkey, authority: Pubkey, round_id: u64) -> Instruction {
let miner_address = miner_pda(authority).0;
let automation_address = automation_pda(authority).0;
let board_address = board_pda().0;
let round_address = round_pda(round_id).0;
let treasury_address = TREASURY_ADDRESS;
Instruction {
program_id: crate::ID,
accounts: vec![
AccountMeta::new(signer, true),
AccountMeta::new(automation_address, false),
AccountMeta::new(board_address, false),
AccountMeta::new(miner_address, false),
AccountMeta::new(round_address, false),
AccountMeta::new(treasury_address, false),
AccountMeta::new_readonly(system_program::ID, false),
],
data: Checkpoint {}.to_bytes(),
}
}
pub fn set_admin(signer: Pubkey, admin: Pubkey) -> Instruction {
let config_address = config_pda().0;

View File

@@ -22,10 +22,6 @@ pub struct Miner {
/// The last round that this miner checkpointed.
pub checkpoint_id: u64,
/// The amount of SOL this miner has had refunded and may claim.
#[deprecated]
pub refund_sol: u64,
/// The amount of SOL this miner can claim.
pub rewards_sol: u64,