Inspect and Compare Token Extension Configurations
Before you build more tokens, learn how to inspect the Token-2022 configurations you’ve already created and compare their extensions, authorities, and on-chain costs.
Inspect and Compare Token Extension Configurations
The Scenario
In Web2 development, when you inherit a codebase or join a new team, one of your first tasks is reading configuration files. You open the package.json, the environment variables, the database schema. You do not start changing things until you understand what is already there. Reading and interpreting existing configuration is a core skill that separates developers who break things from developers who improve things.
Over the past three days, you created three different token mints on Solana, each with different extensions: an interest-bearing token, a multi-extension token combining transfer fees with metadata, and a compliance-gated token with a default frozen account state. Today you are going to slow down and reinforce what you learned by inspecting each of those mints using the CLI, comparing their on-chain data, and mapping the output back to the extension parameters you configured. This is the Solana equivalent of reading configuration files before writing new code.
The Challenge
What you’ll need
- A terminal with the Solana CLI installed
- The spl-token CLI (version 4.0 or later)
- Your Solana keypair configured for devnet
- The mint addresses from Days 36, 37, and 38 (check your terminal history or notes)
Steps
Step 1: Inspect your interest-bearing mint from Day 36
Use the spl-token display command to pull the full on-chain state of your interest-bearing token mint. This command reads the account data and decodes the extensions for you.
spl-token display [YOUR_INTEREST_BEARING_MINT_ADDRESS] --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
Look at the output. You should see a section labeled “Extensions” that includes the interest-bearing configuration. Note the following fields:
- Rate authority: the address that can update the interest rate
- Current rate: the rate you set when you created the mint (in basis points)
Write down the current rate value. Remember, this extension does not mint new tokens. It provides a calculation layer so wallets and applications can display an adjusted balance based on elapsed time.
Step 2: Inspect your multi-extension mint from Day 37
spl-token display [YOUR_MULTI_EXTENSION_MINT_ADDRESS] --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
This time the Extensions section should show multiple entries. Look for:
- TransferFeeConfig: shows the fee in basis points and the maximum fee
- MetadataPointer: shows the authority and the address where metadata lives
- Metadata: shows the name, symbol, and URI you set
Notice how each extension occupies its own block in the output. Extensions are stored sequentially in the mint account’s data, and the CLI parses each one separately.
Step 3: Inspect your default-frozen mint from Day 38
spl-token display [YOUR_FROZEN_MINT_ADDRESS] --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
Here you should see:
- Freeze authority: an address (yours) that can thaw accounts
- DefaultAccountState: listed under Extensions, showing “Frozen” as the default state
Step 4: Compare account sizes
Each extension adds data to the mint account, which means each mint requires a different amount of rent-exempt storage. Run the following command for each of your three mints to see their account sizes:
solana account [MINT_ADDRESS] --output json | grep -o '"space":[ ]*[0-9]*' | grep -o '[0-9]*$'
Alternatively, note the “Data Length” field when you run:
solana account [MINT_ADDRESS]
Record the data length for each mint. You should observe that:
- The interest-bearing mint (one extension) has the smallest data footprint
- The multi-extension mint (transfer fees + metadata) is larger
- The default-frozen mint may be similar in size to the interest-bearing one, since DefaultAccountState adds minimal data
This difference matters because larger accounts cost more SOL in rent-exempt deposits. When you design a token, the extensions you choose have a direct cost implication.
Step 5: Create a comparison table
In a text file, markdown document, or notebook, create a table with the following columns:
- Mint address
- Extensions enabled
- Account data size (bytes)
- Rent cost (SOL)
- Key authorities (mint authority, freeze authority, rate authority, transfer fee authority)
Fill in each row with the data you collected. This table is your reference sheet for understanding how extension choices translate to on-chain costs and governance requirements.
Run it
If you no longer have your mint addresses from the previous days, you can create fresh examples to inspect. Here is a quick way to create a minimal interest-bearing mint for inspection:
spl-token create-token --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb --interest-rate 500
And a minimal default-frozen mint:
spl-token create-token --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb --enable-freeze --default-account-state frozen
Then run spl-token display on each to compare their extension output.
What Just Happened
You stepped back from building and practiced reading. In software development, the ability to inspect existing state is just as valuable as the ability to create new state. You used the spl-token display command to decode on-chain mint data and identify which extensions are active, what parameters they hold, and which authorities govern them.
You also observed that extensions are not free. Each one adds bytes to the account, and those bytes require SOL to keep the account rent-exempt. This is a design tradeoff: more features mean more cost. A token with transfer fees, metadata, and interest-bearing capabilities will cost more to create than a bare token with no extensions. In Web2 terms, it is like choosing between a lightweight microservice and a feature-rich monolith. Both have their place, but you should make the choice deliberately.
Finally, you mapped out the authority structure of each mint. Token Extensions distribute control across multiple authority roles: mint authority, freeze authority, transfer fee authority, rate authority, and metadata update authority. Understanding who controls what is critical before you deploy a token to mainnet, because some of these authorities cannot be changed after creation.
Resources
- Token Extensions overview on Solana Docs
- Extension Guide in the Solana Program Library
- Interest-Bearing Tokens guide
- Transfer Fees extension guide
Submission
Take a screenshot of your comparison table showing all three mints with their extensions, data sizes, and authorities. Submit it here.