re-enabled mining

This commit is contained in:
Hardhat Chad
2025-09-02 12:14:35 -07:00
parent 3f15aca904
commit 3f275747b9
9 changed files with 121 additions and 2 deletions

View File

@@ -19,6 +19,9 @@ pub enum OreInstruction {
SetFeeCollector = 10,
SetFeeRate = 11,
SetSniperFeeDuration = 12,
// Seeker
ClaimSeeker = 13,
}
#[repr(C)]
@@ -100,6 +103,10 @@ pub struct SetSniperFeeDuration {
pub sniper_fee_duration: [u8; 8],
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct ClaimSeeker {}
instruction!(OreInstruction, Claim);
instruction!(OreInstruction, Open);
instruction!(OreInstruction, Close);
@@ -113,3 +120,4 @@ instruction!(OreInstruction, SetBlockDuration);
instruction!(OreInstruction, SetFeeCollector);
instruction!(OreInstruction, SetFeeRate);
instruction!(OreInstruction, SetSniperFeeDuration);
instruction!(OreInstruction, ClaimSeeker);

View File

@@ -287,3 +287,15 @@ pub fn set_sniper_fee_duration(signer: Pubkey, sniper_fee_duration: u64) -> Inst
.to_bytes(),
}
}
pub fn claim_seeker(signer: Pubkey, mint: Pubkey) -> Instruction {
Instruction {
program_id: crate::ID,
accounts: vec![
AccountMeta::new(signer, true),
AccountMeta::new_readonly(mint, false),
AccountMeta::new_readonly(spl_token::ID, false),
],
data: ClaimSeeker {}.to_bytes(),
}
}