Invoke another program from this one (hand program calls lever program) using CPI.
See also: Cross Program Invocation overview and the repository catalog.
- Cross-program invocation (CPI)
- Composing multiple programs in one transaction
From this directory (basics/cross-program-invocation/anchor/):
anchor buildPrerequisites: Agave CLI (version in Anchor.toml [toolchain]), Anchor.
Tests run in-process with LiteSVM. No local validator.
anchor testThis runs cargo test as configured in Anchor.toml. Tests call instruction handlers and check onchain state.
Read the program programs/ source and Anchor.toml for deployed program IDs. For deployment, use anchor build && anchor deploy against your target cluster.