pub fn new_instruction_remove_pool(
        &self,
        admin_address: &Pubkey,
        pool_name: &str,
    ) -> Result<Instruction, FarmClientError> {
        // fill in accounts and instruction data
        let name = str_to_as64(pool_name)?;
        let mut inst = Instruction {
            program_id: main_router::id(),
            data: Vec::<u8>::new(),
            accounts: vec![
                AccountMeta::new_readonly(*admin_address, true),
                AccountMeta::new(
                    find_refdb_pda(&refdb::StorageType::Pool.to_string()).0,
                    false,
                ),
                AccountMeta::new(find_target_pda(refdb::StorageType::Pool, &name).0, false),
                AccountMeta::new_readonly(system_program::id(), false),
            ],
        };

        inst.data = MainInstruction::RemovePool { name }.to_vec()?;

        Ok(inst)
    }
/// Creates a new Instruction for removing Pool's on-chain metadata
Creates a new Instruction for removing Pool's on-chain metadata
Creates a new Instruction for removing Pool ' s on - chain metadata
pub fn new_instruction_remove_pool(
        &self,
        admin_address: &Pubkey,
        pool_name: &str,
    ) -> Result<Instruction, FarmClientError> {
        // fill in accounts and instruction data
        let name = str_to_as64(pool_name)?;
        let mut inst = Instruction {
            program_id: main_router::id(),
            data: Vec::<u8>::new(),
            accounts: vec![
                AccountMeta::new_readonly(*admin_address, true),
                AccountMeta::new(
                    find_refdb_pda(&refdb::StorageType::Pool.to_string()).0,
                    false,
                ),
                AccountMeta::new(find_target_pda(refdb::StorageType::Pool, &name).0, false),
                AccountMeta::new_readonly(system_program::id(), false),
            ],
        };
        inst.data = MainInstruction::RemovePool { name }.to_vec()?;
        Ok(inst)
    }
pub fn new_instruction_remove_pool ( & self , admin_address : & Pubkey , pool_name : & str , ) -> Result < Instruction , FarmClientError > { // fill in accounts and instruction data let name = str_to_as64 ( pool_name ) ? ; let mut inst = Instruction { program_id : main_router :: id ( ) , data : Vec :: < u8 > :: new ( ) , accounts : vec ! [ AccountMeta new_readonly ( admin_address true ) AccountMeta new ( find_refdb_pda ( refdb StorageType Pool to_string ( ) ) 0 false ) AccountMeta new ( find_target_pda ( refdb StorageType Pool name ) 0 false ) AccountMeta new_readonly ( system_program id ( ) false ) ] , } ; inst . data = MainInstruction :: RemovePool { name } . to_vec ( ) ? ; Ok ( inst ) }
Creates a new Instruction for removing Pool's on-chain metadata
Creates a new Instruction for removing Pool ' s on - chain metadata
&self
admin_address
&Pubkey
pool_name
&str
&self
admin_address
&Pubkey
pool_name
&str