2022-07-24 11:20:16 -07:00
|
|
|
#[cfg(target_os = "solana")]
|
|
|
|
mod definitions;
|
|
|
|
|
|
|
|
#[cfg(target_os = "solana")]
|
|
|
|
pub use definitions::*;
|
|
|
|
|
|
|
|
/// Maximum CPI instruction data size. 10 KiB was chosen to ensure that CPI
|
|
|
|
/// instructions are not more limited than transaction instructions if the size
|
|
|
|
/// of transactions is doubled in the future.
|
|
|
|
pub const MAX_CPI_INSTRUCTION_DATA_LEN: u64 = 10 * 1024;
|
|
|
|
|
|
|
|
/// Maximum CPI instruction accounts. 255 was chosen to ensure that instruction
|
2022-10-28 11:30:31 -07:00
|
|
|
/// accounts are always within the maximum instruction account limit for SBF
|
2022-07-24 11:20:16 -07:00
|
|
|
/// program instructions.
|
|
|
|
pub const MAX_CPI_INSTRUCTION_ACCOUNTS: u8 = u8::MAX;
|
|
|
|
|
|
|
|
/// Maximum number of account info structs that can be used in a single CPI
|
|
|
|
/// invocation. A limit on account info structs is effectively the same as
|
2022-09-15 10:50:14 -07:00
|
|
|
/// limiting the number of unique accounts. 128 was chosen to match the max
|
2022-07-24 11:20:16 -07:00
|
|
|
/// number of locked accounts per transaction (MAX_TX_ACCOUNT_LOCKS).
|
2022-09-15 10:50:14 -07:00
|
|
|
pub const MAX_CPI_ACCOUNT_INFOS: usize = 128;
|