Soh Zhe Hong 2eb0bedaa1 add tokens/spl-token-minter/poseidon (#213) 9 luni în urmă
..
anchor 97505283f8 feat: Anchor bankrun (#113) 1 an în urmă
native 21a52cb1eb build bpf -> build sbf (#101) 1 an în urmă
poseidon 2eb0bedaa1 add tokens/spl-token-minter/poseidon (#213) 9 luni în urmă
steel ba4160f7d6 add tokens/spl-token-minter/steel (#179) 9 luni în urmă
README.md 78e67c92a1 docs 2 ani în urmă

README.md

SPL Token Minter

Minting SPL Tokens is a conceptually straightforward process.

The only tricky part is understanding how Solana tracks users' balance of SPL Tokens.


After all, we know every account on Solana by default tracks that account's balance of SOL (the native token), but how could every account on Solana possibly track it's own balance of any possible SPL Token on the Solana network?

TL/DR it's impossible. Instead, we have to use separate accounts that are specifically configured per SPL Token. These are called Associated Token Accounts.


For example, if I create the JOE token, and I want to know what someone's balance of JOE is, I would need to do the following:

1. Create the JOE token
2. Create an Associated Token Account for this user's wallet to track his/her balance of JOE
3. Mint or transfer JOE token to their JOE Associated Token Account

Thus, you can think of Associated Token Accounts as simple counters, which point to a Mint and a Wallet. They simply say "here's the balance of this particular Mint for this particular person's Wallet".