use borsh::{BorshDeserialize, BorshSerialize};
use solana_sdk::pubkey::Pubkey;
use tabled::Tabled;
use crate::program::SWAP_PROGRAM_ID;
#[derive(BorshSerialize, BorshDeserialize, Tabled)]
pub struct ClmmpoolMetadata {
pub clmmpool: Pubkey,
pub position_nums: u64,
pub name: String,
pub symbol: String,
pub uri: String,
}
impl ClmmpoolMetadata {
pub fn find_address(pool: &Pubkey) -> Pubkey {
let (address, _) =
Pubkey::find_program_address(&[b"clmmpool_metadata", pool.as_ref()], &SWAP_PROGRAM_ID);
address
}
}