Solana
Installation
SKILL.md
Rent and Account Creation
- Every Solana account must hold a minimum SOL balance (~0.00089 SOL for basic accounts) to be rent-exempt — accounts below this get deleted
- Sending SOL to a new address that has never received anything will fail if the amount doesn't cover rent-exempt minimum
- Token accounts require separate rent deposits — each new token type a wallet holds costs ~0.002 SOL to create
- Close unused token accounts to recover rent:
spl-token closereturns the SOL to owner
Token Accounts (SPL Tokens)
- Unlike Ethereum, Solana wallets don't automatically hold tokens — each token needs an Associated Token Account (ATA) created first
- First-time token transfers must create the recipient's ATA — sender pays ~0.002 SOL account creation fee
- "Account not found" error usually means the ATA doesn't exist yet, not that the wallet is invalid
- One wallet can have multiple ATAs for the same token (non-associated) — always use the ATA address for standard transfers
Transaction Fees and Priority
- Base fee is ~0.000005 SOL (5000 lamports) per signature — much cheaper than Ethereum
- Priority fee = compute units × price in micro-lamports — set via
SetComputeUnitPriceinstruction - During congestion (NFT mints, popular DEX), transactions without priority fees get dropped, not queued
- Default compute unit limit is 200k per instruction — complex programs may need
SetComputeUnitLimitto increase