mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-14 07:26:51 +00:00
sdk
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user