As a web developer, I’m used to building systems where currencies, rewards, and balances live inside databases controlled by the backend.
This week was my first time creating an actual on-chain token on Solana, and honestly, it changed how I think about digital assets.
Instead of storing balances in a database table, the blockchain itself handled everything — minting, transfers, metadata, and verification.
In this post, I’ll walk through how I created my first token on Solana devnet using Token-2022, added metadata to it, minted supply, and transferred tokens between wallets.
What I Needed Before Starting
Before creating the token, I needed:
- Solana CLI installed
- SPL Token CLI installed
- A funded devnet wallet
- Solana configured to devnet
First, I configured Solana to use devnet:
solana config set --url devnet
Then I requested free devnet SOL:
solana airdrop 2
Creating My First Token Mint
Unlike the older SPL Token Program, I used the newer Token-2022 Program because it supports extensions like:
- Metadata
- Transfer fees
- Interest-bearing tokens
- Non-transferable (soulbound) tokens
Here’s the command I used:
spl-token create-token \
--program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb \
--enable-metadata \
--decimals 6
After running it, Solana generated a token mint address for me.
At this point, the token technically existed on-chain, but it still had no identity.
It was basically just a random string of characters.
Adding Metadata to the Token
This was one of the coolest parts for me.
I learned that Solana’s Token-2022 Program allows metadata to live directly on-chain instead of depending entirely on separate programs.
I initialized the token metadata like this:
spl-token initialize-metadata \
<TOKEN_MINT_ADDRESS> \
"<TOKEN_NAME>" \
"<TOKEN_SYMBOL>" \
"<TOKEN_METADATA_URI>"
Example placeholders:
-
<TOKEN_MINT_ADDRESS>→ your token mint address -
<TOKEN_NAME>→ e.g. MyCoin -
<TOKEN_SYMBOL>→ e.g. MYC -
<TOKEN_METADATA_URI>→ public JSON metadata link
At this point, my token finally had:
- a name
- a symbol
- metadata attached to it
That made it feel like a real digital asset instead of just raw blockchain data.
Creating a Token Account
One concept that confused me initially was token accounts.
I assumed my wallet could directly hold tokens.
That’s not exactly how Solana works.
On Solana:
- the mint defines the token
- token accounts hold balances for that token
So before I could receive my token, I had to create a token account:
spl-token create-account <TOKEN_MINT_ADDRESS>
This generated an associated token account tied to my wallet and token mint.
Minting My First Supply
Now came the exciting part.
I minted 1000 tokens into my token account:
spl-token mint <TOKEN_MINT_ADDRESS> 1000
Then I checked the balance:
spl-token balance <TOKEN_MINT_ADDRESS>
And seeing this:
1000
it felt surprisingly rewarding to be honest
Creating a Second Wallet
To test transfers properly, I created a second wallet:
solana-keygen new \
--outfile ~/second-wallet.json \
--no-bip39-passphrase
This simulated sending tokens to another user.
Transferring Tokens
I transferred 250 tokens to the second wallet:
spl-token transfer \
<TOKEN_MINT_ADDRESS> \
250 \
$(solana-keygen pubkey ~/second-wallet.json) \
--fund-recipient \
--allow-unfunded-recipient
The --fund-recipient flag automatically created the recipient’s token account if it didn’t already exist.
That was another thing that clicked for me:
even receiving tokens on Solana involves token accounts behind the scenes.
Verifying the Transfer
I checked both balances.
My wallet balance:
spl-token balance <TOKEN_MINT_ADDRESS>
Recipient wallet balance:
spl-token balance \
--owner $(solana-keygen pubkey ~/second-wallet.json) \
<TOKEN_MINT_ADDRESS>
The balances showed:
-
750in my wallet -
250in the second wallet
The transfer worked successfully.
What Confused Me Initially
One of the biggest things that confused me was the difference between:
- wallet addresses
- token accounts
- token mints
At first, I thought:
“Why can’t I just send directly to the wallet?”
But Solana separates:
- the wallet owner
- the token account holding balances
- the token definition itself
Once that clicked, the entire token system started making much more sense.
What Surprised Me Most
The biggest surprise was realizing how much logic the blockchain itself handles.
In Web2, building something similar would require:
- database tables
- backend APIs
- transfer validation
- balance management
- permission handling
On Solana:
- the protocol handles balances
- token programs enforce rules
- transactions are verifiable on-chain
It felt like moving backend business logic directly into infrastructure.
Final Thoughts
Creating my first token on Solana made Web3 feel much less abstract.
Before this, tokens felt like mysterious blockchain concepts.
Now I understand that they’re actually programmable digital assets with rules enforced directly by the protocol.
This was my first step into Solana development, and it definitely won’t be the last.
Next, I want to explore:
- transfer fee extensions
- soulbound tokens
- Solana programs with Rust
- building full-stack dApps
If you’re coming from Web2 development, my advice is simple:
Start building.
Things make much more sense once you actually create something yourself.
link to the token: https://explorer.solana.com/address/vXRh8HHmjeFvpQgt19EEqf6iaAQxqM8NtCdTwCAqozu?cluster=devnet
Top comments (0)