mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-13 23:16:52 +00:00
migration
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user