current location:Home >> Blockchain knowledge >> how to create a token on solana blockchain

how to create a token on solana blockchain

admin Blockchain knowledge 607

Creating a token on the Solana blockchain involves several steps, including setting up a Solana wallet, installing the necessary tools, and deploying your token using the Solana Program Library (SPL). Here's a step-by-step guide:


1. Set Up a Solana Wallet

how to create a token on solana blockchain

You'll need a Solana wallet to pay for transaction fees (SOL) and manage your token.
Recommended wallets:

  • Phantom (user-friendly)

  • Solflare (browser & mobile)

  • Backpack (for developers)

Create a wallet and fund it with some SOL (you can get SOL from exchanges like Binance, Coinbase, or Jupiter).


2. Install Required Tools

You'll need the Solana CLI and spl-token CLI to create and manage tokens.

Install Solana CLI

  • Linux/macOS:

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

Verify installation:

solana --version

Install spl-token CLI

cargo install spl-token-cli

3. Connect to Solana Network

Set your CLI to the Solana devnet (for testing):

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

Check your wallet balance:

solana balance

If needed, airdrop some devnet SOL:

solana airdrop 1

4. Create Your Token

Step 1: Create the Token Mint

A mint is the on-chain definition of your token.

spl-token create-token

This will output a Token Mint Address (save this!).

Step 2: Create an Associated Token Account (ATA)

This account will hold your newly created tokens.

spl-token create-account <TOKEN_MINT_ADDRESS>

Step 3: Mint Tokens to Your ATA

Mint a supply (e.g., 1000 tokens with 9 decimals):

spl-token mint <TOKEN_MINT_ADDRESS> 1000

(Replace <TOKEN_MINT_ADDRESS> with your actual mint address.)

Step 4: (Optional) Disable Future Minting

Make your token supply fixed:

spl-token authorize <TOKEN_MINT_ADDRESS> mint --disable

5. Verify Your Token

Check your token balance:

spl-token accounts

View token details:

spl-token supply <TOKEN_MINT_ADDRESS>

6. (Optional) Add Metadata (Token Name, Symbol, Logo)

To make your token visible in wallets like Phantom, you need to add metadata using Metaplex:

1.Install Metaplex CLI:

npm install -g @metaplex-foundation/metaplex-cli

2.Upload metadata (image, name, symbol) to Arweave or IPFS.

3.Create a metadata account:

metaplex create-metadata-account <TOKEN_MINT_ADDRESS> --name "MyToken" --symbol "MTK" --uri "https://your-metadata-url.json"

7. Deploy to Mainnet (When Ready)

Once tested on devnet, switch to mainnet:

solana config set --url https://api.mainnet-beta.solana.com

Then repeat the token creation steps (you'll need real SOL for fees).

Alternative: Use a Token Creator Tool

If CLI seems complex, try:

Final Notes

  • Decimals: Standard is 9 (like SOL), but you can choose 0 (NFTs) or 2 (stablecoins).

  • Supply: Decide if you want an infinite supply (mint authority) or fixed (disable minting).

  • Fees: Creating tokens costs a small amount of SOL (~0.02 SOL on mainnet).

If you have any questions or uncertainties, please join the official Telegram group: https://t.me/GToken_EN

GTokenTool

GTokenTool is the most comprehensive one click coin issuance tool, supporting multiple public chains such as TON, SOL, BSC, etc. Function: Create tokensmarket value managementbatch airdropstoken pre-sales IDO、 Lockpledge mining, etc. Provide a visual interface that allows users to quickly create, deploy, and manage their own cryptocurrencies without writing code.

Similar recommendations