migration

This commit is contained in:
Hardhat Chad
2025-09-18 09:00:49 -07:00
parent 7c94459df0
commit ffaa93d947
9 changed files with 410 additions and 244 deletions

View File

@@ -1,6 +1,6 @@
use steel::*;
use crate::state::config_pda;
use crate::state::{config_pda, OreAccountOLD};
use super::OreAccount;
@@ -25,6 +25,25 @@ pub struct Config {
pub fee_rate: u64,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
pub struct ConfigOLD {
// The address that can set the admin.
pub admin: Pubkey,
// The block duration in slots.
pub block_duration: u64,
// The duration in slots for which the sniper fee is applied.
pub sniper_fee_duration: u64,
// The address that receives fees.
pub fee_collector: Pubkey,
// The fee rate taken for each swap.
pub fee_rate: u64,
}
impl Config {
pub fn pda() -> (Pubkey, u8) {
config_pda()
@@ -32,3 +51,4 @@ impl Config {
}
account!(OreAccount, Config);
account!(OreAccountOLD, ConfigOLD);