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 uses direct runtime syscalls after Hopper-level validation.

Re-exports§

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

Constants§

MAX_CPI_ACCOUNTS
Hard ceiling on the number of account-infos in any single CPI.
MAX_RETURN_DATA
Maximum return data size (1 KiB).
MAX_STATIC_CPI_ACCOUNTS
Default stack-sized ceiling for a static CPI call.

Functions§

invoke
Invoke a CPI with full validation.
invoke_borrow_checked
Invoke a CPI with borrow-state validation only, the Pinocchio-equivalent mid tier.
invoke_checked
Explicit alias for Hopper’s validated CPI path.
invoke_signed
Invoke a signed CPI with full validation.
invoke_signed_borrow_checked
Invoke a signed CPI with borrow-state validation only, the Pinocchio-equivalent mid tier.
invoke_signed_checked
Explicit alias for Hopper’s validated signed CPI path.
invoke_signed_deduped
Invoke a CPI whose account-info list has been deduplicated by pubkey, the SIMD-0339 fewest-infos-per-CPI optimization.
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.