fn invoker_process_instruction(
    _program_id: &Pubkey,
    accounts: &[AccountInfo],
    _input: &[u8],
) -> ProgramResult {
    // if we can call `msg!` successfully, then InvokeContext exists as required
    msg!("Processing invoker instruction before CPI");
    let account_info_iter = &mut accounts.iter();
    let invoked_program_info = next_account_info(account_info_iter)?;
    invoke(
        &Instruction::new_with_bincode(*invoked_program_info.key, &[0], vec![]),
        &[invoked_program_info.clone()],
    )?;
    msg!("Processing invoker instruction after CPI");
    Ok(())
}
// Process instruction to invoke into another program
Process instruction to invoke into another program
Process instruction to invoke into another program
fn invoker_process_instruction(
    _program_id: &Pubkey,
    accounts: &[AccountInfo],
    _input: &[u8],
) -> ProgramResult {
    // if we can call `msg!` successfully, then InvokeContext exists as required
    msg!("Processing invoker instruction before CPI");
    let account_info_iter = &mut accounts.iter();
    let invoked_program_info = next_account_info(account_info_iter)?;
    invoke(
        &Instruction::new_with_bincode(*invoked_program_info.key, &[0], vec![]),
        &[invoked_program_info.clone()],
    )?;
    msg!("Processing invoker instruction after CPI");
    Ok(())
}
fn invoker_process_instruction ( _program_id : & Pubkey , accounts : & [ AccountInfo ] , _input : & [ u8 ] , ) -> ProgramResult { // if we can call `msg!` successfully, then InvokeContext exists as required msg ! ( " " ) ; let account_info_iter = & mut accounts . iter ( ) ; let invoked_program_info = next_account_info ( account_info_iter ) ? ; invoke ( & Instruction :: new_with_bincode ( * invoked_program_info . key , & [ 0 ] , vec ! [ ] ) , & [ invoked_program_info . clone ( ) ] , ) ? ; msg ! ( " " ) ; Ok ( ( ) ) }
Process instruction to invoke into another program
Process instruction to invoke into another program
_program_id
&Pubkey
accounts
&[AccountInfo]
_input
&[u8]