Create Your Own Token and NFT on Solana | ZappyCode

Create Your Own Token and NFT on Solana.

Solana is a cryptocurrency probably most comparable with Ethereum. Both Solana and Ethereum allow people to build on top on their blockchain and use smart contracts for things like DeFi, Dapps, creating your own token, or NFTs. So what’s the difference? Solana aims to be much more scalable than ethereum with lower transaction fees and faster block times (under a second)!

Learning How to Work with Solana.

To help you get a grasp on Solana. I’m gonna to walk you through 3 fun things you can do:

Set up a wallet Mint (create) your own token Make your own NFT.

1 – Setting Up a Solana Wallet.

A wallet is where we’ll store the token we are creating and our NFT. There are several ways to make a wallet but we will be making ours with the command line. First, we need to install the Solana Tool Suite.

Now with the tool installed, let’s create a wallet. Also called a keypair. Open your terminal if you’re on a Mac/Linux or Command Prompt if on Windows.

Now in our terminal, let’s move to our Desktop, make a folder where we’ll store our wallet data, and create a wallet.

cd Desktop mkdir SolanaWallet solana-keygen new –outfile SolanaWallet/my-keypair.json.

It will ask for a password but I’d recommend not setting one as we’re just testing things out. With that, your new wallet has been created! That long string of letters and numbers that starts with AdrV3 is my public address. Yours will be different from mine but for the rest of the tutorial any time you see YOUR_ADDRESS, that means you should use your public address.

solana airdrop 1 YOUR_ADDRESS –url https://api.devnet.solana.com.

Boom! You now have 1 SOL in your wallet on the devnet. If you want a better way to see what’s in your wallet, you can use the Solana Explorer. Go there, on the top right chain mainnet to devnet, and paste in YOUR_ADDRESS. You’ll see that your account has 1 SOL! To get an even better view of your wallet, use the Phantom Wallet. It’s a Chrome/Brave extension that makes it easy to view your wallet and interact with Solana Dapps. It’s in beta but use the code 1729 to get access.

2 – Make Your Own Token.

solana config set –url https://devnet.solana.com solana config set –keypair SolanaWallet/my-keypair.json.

spl-token create-token.

spl-token create-account YOUR_TOKEN.

spl-token mint YOUR_TOKEN 420.

Boom! You just added 420 new tokens out into the world. You can send or NFT sell them to whoever you want. Want to add more? Just run that same command again and add 1,000 if you’d like. If you’re the US government, you’ll make trillions of new tokens every year until no one takes your token seriously anymore 😉 Now if you do ever want to end the supply of tokens, NFT you can disable the minting process but be warned, this can’t be undone. This technique will be covered in our NFT section, which means it’s time to.

3 – Make Your Own NFT.

Make a new token with no decimals Create an account to hold it Mint 1 token Cap supply.

spl-token create-token –decimals 0 spl-token create-account YOUR_NFT_TOKEN spl-token mint YOUR_NFT_TOKEN 1 spl-token authorize YOUR_NFT_TOKEN mint –disable.

Ahhhh, take a whiff of that newly minted NFT of yours 🙂 Again, check it out on the Solana Explorer to see the fixed supply set to 1 with no decimals. I hope this helped you get a good grasp on Solana! This tutorial was prompted by Balaji and 1729. If you enjoyed this, you’ll love his newsletter there. If you liked my teaching style, join me on ZappyCode! I’ll teach you how to make apps and websites. You can even pick your own price!

Spread the love