createTokenPool() requires only fee_payer and has no mint authority constraint.
The token pool account itself requires rent, but individual compressed token accounts are rent-free.
Best Practice: Each mint supports a maximum of 4 token pools total. During compression/decompression operations, token pools get write-locked. Use
addTokenPools() to create additional pools that increase per-block write-lock capacity.Full Code Example
1
Prerequisites
Make sure you have dependencies and developer environment set up!Prerequisites & Setup
Prerequisites & Setup
DependenciesDeveloper Environment
- npm
- yarn
- pnpm
- Localnet
- Devnet
By default, all guides use Localnet.
- npm
- yarn
- pnpm
2
Troubleshooting
TokenPool not found
TokenPool not found
You’re trying to access a token pool that doesn’t exist.
Advanced Configuration
Batch Pool Creation
Batch Pool Creation
Create pools for multiple mints:
Create Pool with Token-2022
Create Pool with Token-2022
Create token pools for Token-2022 mints: