Skip to content

This repository contains full tutorial on Solana SPL token

License

Notifications You must be signed in to change notification settings

extensive-weird/solana-spl-tutorial

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

🚀 Solana SPL Tutorial

This repository contains full tutorial on Solana SPL token

Table of Contents

Prerequisites

1. Solana CLI

MacOS & Linux

sh -c "$(curl -sSfL https://release.solana.com/v1.9.5/install)"

Windows

curl https://release.solana.com/v1.9.5/solana-install-init-x86_64-pc-windows-msvc.exe --output C:\solana-install-tmp\solana-install-init.exe --create-dirs

2. SPL CLI

cargo install spl-token-cli

3. Solana Wallet

For this tutorial, we're going to use a Filesystem wallet. This is sufficient for testing, but not recommended for production purpose.

solana-keygen new --no-outfile

4. Configure Solana Cluster

Check your Solana Cluster configuration

solana config get

Set the Solana Cluster to Testnet

solana config set --url https://api.devnet.solana.com

5. SOL Balance

To check you SOL balance

solana balance

To get some testnet SOL

solana airdrop 1

Creating SPL Tokens

First, create the token

spl-token create-token

Using the unique token identifier, we can create an account to store our balance data

spl-token create-account <token-identifier>

Once the account is created, we can mint some SPL tokens.

 spl-token mint <token-identifier> <token-amount>

To check the total supply of the token, use the following command

spl-token supply <token-identifier>

To check the balance of the token, use the following command

spl-token balance <token-identifier>

Creating SPL NFTs

First, create the token

spl-token create-token --decimals 0

Using the unique token identifier, we can create an account to store our balance data

spl-token create-account <token-identifier>

Mint only one token into the account

spl-token mint <token-identifier> 1 <token-account>

Disable future minting

spl-token authorize <token-identifier> mint --disable

Further Resources

License

MIT License

About

This repository contains full tutorial on Solana SPL token

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published