solana-bpf-program-template
solana-bpf-program-template copied to clipboard
Example: program that creates/closes a SPL Token account that it owns
A simple program that supports two instructions:
- 0 - create a SPL Token account at a constant program-derived address
- 1 - close the SPL Token account created by "0". This demonstrates the program's authority over the account
The unit test can be run by installing Solana 1.4.6 or greater and running cargo test-bpf