Simple Token Vault
- Node.js
- Yarn
- Solana CLI
- Anchor CLI
-
Install Solana and Anchor CLI
- For detailed instructions, see: https://www.anchor-lang.com/docs/installation
-
Install dependencies
yarn install
-
Set up private key
- Create
./.pks
directory - Create
./.pks/deployer-test.json
file and paste your private key into it
- Create
-
Build the program
anchor build
-
Sync program address
anchor keys sync
-
Test the program
anchor test
-
Deploy the program
yarn deploy:test
-
Create state
yarn createState:test
-
Create POOL
- Open
scripts/create-pool.ts
and edit the configuration inside - Run the command:
yarn createPool:test
- Open
-
Create Mint (if needed)
- See
scripts/create-mint.ts
for details on token creation and minting
- See
- StateAccount: manages some global state (if any)
- PoolAccount:
- each pool has a unique slug (max 32 characters)
- stores information about authority, mint, fee, user max amount
- UserPoolAccount:
- stores user information for each pool