mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-14 07:26:51 +00:00
seeker
This commit is contained in:
@@ -21,6 +21,7 @@ pub enum OreInstruction {
|
||||
|
||||
// Seeker
|
||||
ClaimSeeker = 15,
|
||||
MigrateMiner = 16,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
@@ -121,6 +122,10 @@ pub struct Bury {
|
||||
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
|
||||
pub struct ClaimSeeker {}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
|
||||
pub struct MigrateMiner {}
|
||||
|
||||
instruction!(OreInstruction, Automate);
|
||||
instruction!(OreInstruction, Boost);
|
||||
instruction!(OreInstruction, ClaimSOL);
|
||||
@@ -134,3 +139,4 @@ instruction!(OreInstruction, Reset);
|
||||
instruction!(OreInstruction, SetAdmin);
|
||||
instruction!(OreInstruction, SetFeeCollector);
|
||||
instruction!(OreInstruction, ClaimSeeker);
|
||||
instruction!(OreInstruction, MigrateMiner);
|
||||
|
||||
@@ -359,3 +359,17 @@ pub fn claim_seeker(signer: Pubkey, mint: Pubkey) -> Instruction {
|
||||
data: ClaimSeeker {}.to_bytes(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn migrate_miner(signer: Pubkey, address: Pubkey) -> Instruction {
|
||||
let config_address = config_pda().0;
|
||||
Instruction {
|
||||
program_id: crate::ID,
|
||||
accounts: vec![
|
||||
AccountMeta::new(signer, true),
|
||||
AccountMeta::new(config_address, false),
|
||||
AccountMeta::new(address, false),
|
||||
AccountMeta::new_readonly(system_program::ID, false),
|
||||
],
|
||||
data: MigrateMiner {}.to_bytes(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,9 +13,8 @@ pub struct Config {
|
||||
// The last boost timestamp.
|
||||
pub last_boost: i64,
|
||||
|
||||
// The minimum amount of SOL that can be deploy.
|
||||
#[deprecated(since = "1.0.0", note = "Unused")]
|
||||
pub min_deploy_amount: u64,
|
||||
// Whether seeker activation is enabled.
|
||||
pub is_seeker_activation_enabled: u64,
|
||||
|
||||
// The address that receives fees.
|
||||
pub fee_collector: Pubkey,
|
||||
|
||||
Reference in New Issue
Block a user