Cross-contract (env)
Phase A: synchronous CPI. Parent storage flushed into the shared journal before nested call (read-your-writes). MAX_CALL_DEPTH = 8.
call_contract live
text
call_contract(addr_ptr, addr_len, input_ptr, input_len, result_ptr, result_max) → i32Invoke another .app. Nested get_caller = this contract. Writes result bytes to result_ptr.
Returns: bytes written, or -1 (depth exceeded / no dispatcher / bad args).
Analogs: CosmWasm WasmMsg::Execute (queued there), NEAR promise_create (async there).
call_contract_with_value planned
Same + attach uNRO for child’s attached deposit.