Ok so you won't believe, I just ran two CLI commands and voila! I had my own branded digital asset on chain. It felt like magic.
A week back, as a Web2 dev, I was skeptic — "what does a 'token' mean here on Solana?" Is it like my ID Card to enter the office building? Or is it like ether on Clash of Clans? Maybe it would be something I can use to access the Airport Lounge? Or is it something we get in return for keeping our belongings with the guard at DMart?
The Curiosity Got the Better of Me
To quench this thirst of curiosity, I dived into Week 5 of 100 Days of Solana by MLH and entered this on my terminal:
spl-token create-token --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb --enable-metadata --decimals 6
Creating token Bpd4hMuxPTm59Kg963B4uL8naGxZfmbnKNxUP4WZgCcG under program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
To initialize metadata inside the mint, please run `spl-token initialize-metadata Bpd4hMuxPTm59Kg963B4uL8naGxZfmbnKNxUP4WZgCcG <YOUR_TOKEN_NAME> <YOUR_TOKEN_SYMBOL> <YOUR_TOKEN_URI>`, and sign with the mint authority.
Address: Bpd4hMuxPTm59Kg963B4uL8naGxZfmbnKNxUP4WZgCcG
Decimals: 6
Signature: 3Y5outgFAtZ7K3bWRUMyP7g3kzKgW8C3Lj1c6U7s31FwmWrRMSyeMioNcRQRR7Ls53iLKiVdmUKr6Pa9AhKEzvKE
At this state I got an empty canvas addressed at Bpd4hMuxPTm59Kg963B4uL8naGxZfmbnKNxUP4WZgCcG, but the painting was yet to be done. And let me tell you, I am no artist — but the --enable-metadata flag that you see back there? It helped me paint my idea in a single brush stroke (or shall I say keystroke 😜).
spl-token initialize-metadata Bpd4hMuxPTm59Kg963B4uL8naGxZfmbnKNxUP4WZgCcG CoffeeBean CBT "https://raw.githubusercontent.com/denilbhatt0814/MLH-100-days-of-solana/refs/heads/main/day-34-token-writeup/assets/metadata.png"
Signature: 5vrxUWhHoZZXNr1MdnhPpiMQzxsCS62yBWwiuF15E6ZpEpYZuob4LJqRhN1Kx61ayHFpKUvr6BtKdXRqW5n164Yg
And there it was — CoffeeBean is now real, on-chain.
Ok But... What Do I Do With It?
I had the same question. What value do these tokens actually bring to real life?
Let's compare this to Starbucks Points.
Do you actually own your Starbucks points? Are you sure you won't lose them, or they won't be tampered with? Say Starbucks gets hit by a malware that wipes all your points. Gone. Just like that.
Well, with CoffeeBean — that shouldn't be an issue. CBT, once minted, goes straight to your wallet and you own it. You decide what happens with it. Not Starbucks. Not their vendor. Not their database admin at 2am. You.
This clarifies something important:
In Web2, if Starbucks shuts down tomorrow — your loyalty points go straight to zero.
On Solana, your CoffeeBean token would still exist in your wallet.
But tell me honestly — what will you do with that token if your favourite coffee shop doesn't exist anymore?
Frankly, I don't have the answer to that yet. But I am on Day 34 of 100, so maybe I will. 🤷♂️
Following my journey live on GitHub — code, notes, and all the terminal chaos. Drop a #100DaysOfSolana if you're on this ride too.
Top comments (0)