mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-18 07:26:44 +00:00
config
This commit is contained in:
@@ -200,13 +200,13 @@ pub fn migrate_miner(signer: Pubkey, address: Pubkey) -> Instruction {
|
||||
|
||||
pub fn migrate_treasury(signer: Pubkey) -> Instruction {
|
||||
let config_address = config_pda().0;
|
||||
let treasury_address = treasury_pda().0;
|
||||
// let treasury_address = treasury_pda().0;
|
||||
Instruction {
|
||||
program_id: crate::ID,
|
||||
accounts: vec![
|
||||
AccountMeta::new(signer, true),
|
||||
AccountMeta::new(config_address, false),
|
||||
AccountMeta::new(treasury_address, false),
|
||||
// AccountMeta::new(treasury_address, false),
|
||||
AccountMeta::new_readonly(system_program::ID, false),
|
||||
],
|
||||
data: MigrateTreasury {}.to_bytes(),
|
||||
|
||||
@@ -1,22 +1,41 @@
|
||||
use steel::*;
|
||||
|
||||
use crate::state::config_pda;
|
||||
use crate::state::{config_pda, OreAccountOLD};
|
||||
|
||||
use super::OreAccount;
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
|
||||
pub struct Config {
|
||||
// The address that can set the admin.
|
||||
/// The address that can update the config.
|
||||
pub admin: Pubkey,
|
||||
|
||||
// The last boost timestamp.
|
||||
/// The adress with authority to call bury.
|
||||
pub bury_authority: Pubkey,
|
||||
|
||||
/// The address that receives admin fees.
|
||||
pub fee_collector: Pubkey,
|
||||
|
||||
/// The last boost timestamp.
|
||||
pub last_boost: i64,
|
||||
|
||||
// Whether seeker activation is enabled.
|
||||
/// Whether seeker activation is enabled.
|
||||
pub is_seeker_activation_enabled: u64,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
|
||||
pub struct ConfigOLD {
|
||||
/// The address that can update the config.
|
||||
pub admin: Pubkey,
|
||||
|
||||
/// The last boost timestamp.
|
||||
pub last_boost: i64,
|
||||
|
||||
/// Whether seeker activation is enabled.
|
||||
pub is_seeker_activation_enabled: u64,
|
||||
|
||||
// The address that receives fees.
|
||||
/// The address that receives admin fees.
|
||||
pub fee_collector: Pubkey,
|
||||
|
||||
// The fee rate taken for each swap.
|
||||
@@ -31,3 +50,4 @@ impl Config {
|
||||
}
|
||||
|
||||
account!(OreAccount, Config);
|
||||
account!(OreAccountOLD, ConfigOLD);
|
||||
|
||||
@@ -38,6 +38,7 @@ pub enum OreAccount {
|
||||
#[repr(u8)]
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, IntoPrimitive, TryFromPrimitive)]
|
||||
pub enum OreAccountOLD {
|
||||
ConfigOLD = 101,
|
||||
MinerOLD = 103,
|
||||
TreasuryOLD = 104,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user