Skip to main content

Module cpi

Module cpi 

Source
Expand description

Cross-program invocation via sol_invoke_signed_c.

Provides both checked (borrow-validating) and unchecked invoke paths.

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_signed
Invoke a signed CPI with full validation.
invoke_signed_unchecked⚠
Invoke a signed CPI without the local borrow/privilege preflight.
invoke_signed_with_bounds
Signed invoke with a dynamic number of accounts (bounded by const generic).
invoke_unchecked⚠
Invoke a CPI without the local borrow/privilege preflight. Prefer invoke unless the caller can uphold the unchecked contract.
invoke_with_bounds
Invoke with a dynamic number of accounts (bounded by const generic).
set_return_data
Set return data for the current instruction.