pub fn invoke(
instruction: &Instruction,
account_infos: &[AccountInfo<'_>],
) -> ProgramResultExpand 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 processaccount_infos- The accounts required to process the instruction
§Returns
ProgramResult- Ok(()) if successful, or an error if the operation fails