pub fn get_stack_height() -> u64Expand description
Get the current instruction stack height.
Returns 1 for top-level instructions invoked by the runtime. Returns 2+ for instructions running inside a CPI call.
Use this to implement CPI guards that prevent unauthorized composition.