Mint tokens with a PDA as mint authority so the program controls issuance.
See also: Pda Mint Authority overview and the repository catalog.
- PDA mint authority
- CPI mint_to
- Amounts:
mint_tokentakesamountin minor units, the raw integer the token program operates on. Clients convert from major units offchain: 1 token with 9 decimals is1 * 10^9minor units. The program never scales amounts onchain.
From this directory (tokens/pda-mint-authority/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.