pub fn new_instruction_enable_deposit_vault(
        &self,
        admin_address: &Pubkey,
        vault_name: &str,
    ) -> Result<Instruction, FarmClientError> {
        // get vault info
        let vault = self.get_vault(vault_name)?;
        let vault_ref = self.get_vault_ref(vault_name)?;

        // fill in accounts and instruction data
        let mut inst = Instruction {
            program_id: vault.vault_program_id,
            data: Vec::<u8>::new(),
            accounts: vec![
                AccountMeta::new_readonly(*admin_address, true),
                AccountMeta::new_readonly(vault_ref, false),
                AccountMeta::new(vault.info_account, false),
            ],
        };

        inst.data = VaultInstruction::EnableDeposit.to_vec()?;

        Ok(inst)
    }
/// Creates a new Instruction for enabling deposits to the Vault
Creates a new Instruction for enabling deposits to the Vault
Creates a new Instruction for enabling deposits to the Vault
pub fn new_instruction_enable_deposit_vault(
        &self,
        admin_address: &Pubkey,
        vault_name: &str,
    ) -> Result<Instruction, FarmClientError> {
        // get vault info
        let vault = self.get_vault(vault_name)?;
        let vault_ref = self.get_vault_ref(vault_name)?;
        // fill in accounts and instruction data
        let mut inst = Instruction {
            program_id: vault.vault_program_id,
            data: Vec::<u8>::new(),
            accounts: vec![
                AccountMeta::new_readonly(*admin_address, true),
                AccountMeta::new_readonly(vault_ref, false),
                AccountMeta::new(vault.info_account, false),
            ],
        };
        inst.data = VaultInstruction::EnableDeposit.to_vec()?;
        Ok(inst)
    }
pub fn new_instruction_enable_deposit_vault ( & self , admin_address : & Pubkey , vault_name : & str , ) -> Result < Instruction , FarmClientError > { // get vault info let vault = self . get_vault ( vault_name ) ? ; let vault_ref = self . get_vault_ref ( vault_name ) ? ; // fill in accounts and instruction data let mut inst = Instruction { program_id : vault . vault_program_id , data : Vec :: < u8 > :: new ( ) , accounts : vec ! [ AccountMeta new_readonly ( admin_address true ) AccountMeta new_readonly ( vault_ref false ) AccountMeta new ( vault info_account false ) ] , } ; inst . data = VaultInstruction :: EnableDeposit . to_vec ( ) ? ; Ok ( inst ) }
Creates a new Instruction for enabling deposits to the Vault
Creates a new Instruction for enabling deposits to the Vault
&self
admin_address
&Pubkey
vault_name
&str
&self
admin_address
&Pubkey
vault_name
&str