Skip to main content

Module cpi

Module cpi 

Source
Expand description

Cross-program invocation for Hopper programs.

Provides both checked (borrow-validating) and unchecked invoke paths. hopper-native-backend uses direct runtime syscalls; compatibility backends delegate through compat after Hopper-level validation.

Re-exports§

pub use crate::instruction::Signer;
pub use crate::instruction::Seed;

Constants§

MAX_CPI_ACCOUNTS
Maximum number of accounts in any CPI call.
MAX_RETURN_DATA
Maximum return data size (1 KiB).
MAX_STATIC_CPI_ACCOUNTS
Maximum number of accounts in a static CPI call.

Functions§

invoke
Invoke a CPI with full validation.
invoke_signed
Invoke a signed CPI with full validation.
invoke_signed_unchecked
Invoke a signed CPI without borrow validation.
invoke_signed_with_bounds
Signed invoke with a dynamic number of accounts (bounded by const generic).
invoke_unchecked
Invoke a CPI without borrow validation (lowest CU cost).
invoke_with_bounds
Invoke with a dynamic number of accounts (bounded by const generic).
set_return_data
Set return data for the current instruction.