Skip to main content

invoke

Function invoke 

Source
pub fn invoke(
    instruction: &Instruction,
    account_infos: &[AccountInfo<'_>],
) -> ProgramResult
Expand description

Invokes a program instruction through cross-program invocation.

This function processes the provided instruction by dispatching control to another program using the account information provided.

§Arguments

  • instruction - The instruction to process
  • account_infos - The accounts required to process the instruction

§Returns

  • ProgramResult - Ok(()) if successful, or an error if the operation fails