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

@@ -26,6 +26,14 @@ pub enum OreAccount {
Square = 106,
}
#[repr(u8)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, IntoPrimitive, TryFromPrimitive)]
pub enum OreAccountOLD {
ConfigOLD = 101,
MinerOLD = 103,
TreasuryOLD = 104,
}
pub fn board_pda() -> (Pubkey, u8) {
Pubkey::find_program_address(&[BOARD], &crate::ID)
}
@@ -42,11 +50,6 @@ pub fn square_pda(id: u64) -> (Pubkey, u8) {
Pubkey::find_program_address(&[SQUARE, &id.to_le_bytes()], &crate::ID)
}
// pub fn vault_address() -> Pubkey {
// let board_address = board_pda().0;
// spl_associated_token_account::get_associated_token_address(&board_address, &MINT_ADDRESS)
// }
pub fn treasury_pda() -> (Pubkey, u8) {
Pubkey::find_program_address(&[TREASURY], &crate::ID)
}