Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

PDA Mint Authority (Quasar)

Mint with a PDA as mint authority.

See also: Pda Mint Authority overview and the repository catalog.

Major concepts

  • PDA mint authority
  • mint_to CPI
  • create_mint takes a decimals instruction argument and initializes the mint with it
  • mint_tokens takes amount in minor units, the raw integer the token program operates on

Setup

From tokens/pda-mint-authority/quasar/:

quasar build

Prerequisites: Quasar CLI and Agave toolchain (see Quasar.toml).

Testing

In-process tests via Quasar SVM (quasar-svm in Quasar.toml):

cargo test

Tests invoke instruction handlers and assert onchain state. No local validator.

Usage

Read src/ and Quasar.toml. Compare with the Anchor variant in the same example where present.