mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-17 23:16:48 +00:00
seeker
This commit is contained in:
@@ -13,9 +13,12 @@ pub struct Miner {
|
||||
/// The miner's prospects in the current round.
|
||||
pub deployed: [u64; 25],
|
||||
|
||||
/// The executor with permmission to deploy capital with this account.
|
||||
/// Unused buffer.
|
||||
#[deprecated(note = "Use automation executor instead")]
|
||||
pub executor: Pubkey,
|
||||
pub buffer: [u8; 24],
|
||||
|
||||
/// Whether this miner is associated with a Solana Seeker.
|
||||
pub is_seeker: u64,
|
||||
|
||||
/// The amount of SOL this miner has had refunded and may claim.
|
||||
pub refund_sol: u64,
|
||||
|
||||
@@ -2,6 +2,7 @@ mod automation;
|
||||
mod board;
|
||||
mod config;
|
||||
mod miner;
|
||||
mod seeker;
|
||||
mod square;
|
||||
mod treasury;
|
||||
|
||||
@@ -9,6 +10,7 @@ pub use automation::*;
|
||||
pub use board::*;
|
||||
pub use config::*;
|
||||
pub use miner::*;
|
||||
pub use seeker::*;
|
||||
pub use square::*;
|
||||
pub use treasury::*;
|
||||
|
||||
@@ -27,6 +29,7 @@ pub enum OreAccount {
|
||||
//
|
||||
Board = 105,
|
||||
Square = 106,
|
||||
Seeker = 107,
|
||||
}
|
||||
|
||||
pub fn automation_pda(authority: Pubkey) -> (Pubkey, u8) {
|
||||
@@ -45,6 +48,10 @@ pub fn miner_pda(authority: Pubkey) -> (Pubkey, u8) {
|
||||
Pubkey::find_program_address(&[MINER, &authority.to_bytes()], &crate::ID)
|
||||
}
|
||||
|
||||
pub fn seeker_pda(mint: Pubkey) -> (Pubkey, u8) {
|
||||
Pubkey::find_program_address(&[SEEKER, &mint.to_bytes()], &crate::ID)
|
||||
}
|
||||
|
||||
pub fn square_pda() -> (Pubkey, u8) {
|
||||
Pubkey::find_program_address(&[SQUARE], &crate::ID)
|
||||
}
|
||||
|
||||
13
api/src/state/seeker.rs
Normal file
13
api/src/state/seeker.rs
Normal file
@@ -0,0 +1,13 @@
|
||||
use steel::*;
|
||||
|
||||
use super::OreAccount;
|
||||
|
||||
/// Seeker is an account which prevents multiple Seeker genesis tokens from being claimed.
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
|
||||
pub struct Seeker {
|
||||
// The mint address of the Seeker token.
|
||||
pub mint: Pubkey,
|
||||
}
|
||||
|
||||
account!(OreAccount, Seeker);
|
||||
@@ -14,11 +14,4 @@ pub struct Treasury {
|
||||
pub motherlode: u64,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
|
||||
pub struct TreasuryOLD {
|
||||
// The amount of SOL collected for buy-bury operations.
|
||||
pub balance: u64,
|
||||
}
|
||||
|
||||
account!(OreAccount, Treasury);
|
||||
|
||||
Reference in New Issue
Block a user