Giter Club home page Giter Club logo

solana-spl-tutorial's Introduction

๐Ÿš€ 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

solana-spl-tutorial's People

Contributors

yosephks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.