crea8r / communify

Decaying tokens.
0 stars 0 forks source link

migrate Memo to the new data structure #16

Open 0xk2 opened 1 month ago

0xk2 commented 1 month ago

old data structure

pub struct Memo {
    pub community: Pubkey,
    pub from: Pubkey,
    pub to: Pubkey,
    pub amount: u64,
    #[max_len(50)]
    pub note: String,
}

new data structure

pub struct Memo {
    pub community: Pubkey,
    pub from: Pubkey,
    pub to: Pubkey,
    pub amount: u64,
        pub created_at: u64,
    #[max_len(50)]
    pub note: String,
}
0xk2 commented 3 weeks ago

trick: change seed to "MEMO" and discard all the old data.