pub fn new_instruction_governance_instruction_insert(
        &self,
        wallet_address: &Pubkey,
        governance_name: &str,
        proposal_index: u32,
        instruction_index: u16,
        instruction: &Instruction,
    ) -> Result<Instruction, FarmClientError> {
        let (dao_program, _realm_address, _dao_token, governance, token_owner, proposal_address) =
            self.get_dao_accounts(wallet_address, governance_name, proposal_index)?;

        let instruction_data: InstructionData = instruction.clone().into();

        let inst = dao_instruction::insert_instruction(
            &dao_program,
            &governance,
            &proposal_address,
            &token_owner,
            wallet_address,
            wallet_address,
            0,
            instruction_index,
            0,
            instruction_data,
        );

        Ok(inst)
    }
/// Creates a new instruction for adding a new instruction to governance proposal
Creates a new instruction for adding a new instruction to governance proposal
Creates a new instruction for adding a new instruction to governance proposal
pub fn new_instruction_governance_instruction_insert(
        &self,
        wallet_address: &Pubkey,
        governance_name: &str,
        proposal_index: u32,
        instruction_index: u16,
        instruction: &Instruction,
    ) -> Result<Instruction, FarmClientError> {
        let (dao_program, _realm_address, _dao_token, governance, token_owner, proposal_address) =
            self.get_dao_accounts(wallet_address, governance_name, proposal_index)?;
        let instruction_data: InstructionData = instruction.clone().into();
        let inst = dao_instruction::insert_instruction(
            &dao_program,
            &governance,
            &proposal_address,
            &token_owner,
            wallet_address,
            wallet_address,
            0,
            instruction_index,
            0,
            instruction_data,
        );
        Ok(inst)
    }
pub fn new_instruction_governance_instruction_insert ( & self , wallet_address : & Pubkey , governance_name : & str , proposal_index : u32 , instruction_index : u16 , instruction : & Instruction , ) -> Result < Instruction , FarmClientError > { let ( dao_program , _realm_address , _dao_token , governance , token_owner , proposal_address ) = self . get_dao_accounts ( wallet_address , governance_name , proposal_index ) ? ; let instruction_data : InstructionData = instruction . clone ( ) . into ( ) ; let inst = dao_instruction :: insert_instruction ( & dao_program , & governance , & proposal_address , & token_owner , wallet_address , wallet_address , 0 , instruction_index , 0 , instruction_data , ) ; Ok ( inst ) }
Creates a new instruction for adding a new instruction to governance proposal
Creates a new instruction for adding a new instruction to governance proposal
&self
wallet_address
&Pubkey
governance_name
&str
proposal_index
u32
instruction_index
u16
instruction
&Instruction
&self
wallet_address
&Pubkey
governance_name
&str
proposal_index
u32
instruction_index
u16
instruction
&Instruction