harikrishnan303 / HK-Token

My_Solana_Token

Home Page:https://solscan.io/token/HtNtx9HtMGc3Zm6PQhNYup7uRKmTwWPKQMPqoDLkibe2?cluster=devnet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SPL Token-22 Guide πŸš€

This guide outlines the process for creating and managing SPL Token-2022 on the Solana blockchain, focusing on the Devnet for testing purposes. Follow these steps to mint your custom SPL tokens, aptly named "Token-22", and connect your paper wallet to the Phantom Wallet for a seamless Solana blockchain experience.

Prerequisites πŸ“‹

Before starting, ensure you have installed the following tools:

  • Solana CLI: Installation Guide πŸ› οΈ
  • Node.js: Download Page πŸ“₯
  • Mpl Token Metadata: Install via npm with npm install @metaplex-foundation/mpl-token-metadata
  • SPL Token CLI: Follow the instructions in the Solana documentation or install it via npm with npm install -g @solana/spl-token
  • ts-node: Install via npm with npm install -g ts-node

Getting Started 🌟

Step 1: Generate a Key Pair πŸ”‘

Generate a key pair that starts with a specific prefix (e.g., "KVN"). This command searches for a key pair that meets the criteria, which can take some time.

solana-keygen grind --starts-with KVN:1

Rename your key pair file to KVN__________.json for easier reference.

Step 1(a): Generate a Mint Key Pair πŸ”‘

Generate a key pair that starts with a specific prefix (e.g., "KV"). This command searches for a key pair that meets the criteria, which can take some time.

solana-keygen grind --starts-with KV:1

Step 2: Configure Solana CLI βš™οΈ

Set the Solana CLI to use your newly generated key pair.

solana config set --keypair /path/to/KVN__________.json

Set to Devnet

You Can Change it to devnet,testnet,mainnet-beta. (Devnet in our Case)

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

Step 3: Request Airdrop πŸ’Έ

Request an airdrop of 2 SOL to your account on the Devnet.

solana airdrop 2

Step 4: Create Your SPL Token πŸͺ™

Create your SPL token using one of the two methods below:

Option 1: With Key Pair File

spl-token create-token -p TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb /path/to/KVNmDjP8vhUTCk6toCtLu5gXDurV5CJfX6JGgbrBzsJ.json

Option 2: Recommended

spl-token create-token -p TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb

Step 5: Run Your TypeScript File πŸ“œ

After adjusting addresses and keys in mpl_token22.ts, execute it:

ts-node ./mpl_token22.ts

Step 6: Mint Tokens πŸ”¨

Create a token account and mint your desired amount of tokens you wish. Replace with your token's address:

spl-token create-account <token_address>
spl-token mint <token_address> 10000000

Step 7: Connect to Phantom Wallet πŸ‘»

Convert the private key from your JSON file for Phantom Wallet import:

more /path/to/KVN__________.json

Copy the output, which is an array of numbers, to import into Phantom Wallet:

  1. Open Phantom Wallet and switch to Testnet mode in Settings.
  2. Choose to Import Private Key.
  3. Paste the key array, name the account, and proceed, ignore any format warning.

Screenshots πŸ“Έ

Token Details on Solana Explorer

Token Explorer Details

Explorer Link

Wallet Balance

Wallet Balance

My Wallet Address : KVNmDjP8vhUTCk6toCtLu5gXDurV5CJfX6JGgbrBzsJ

Send Me Your Token After Creating 😊πŸ₯³

Additional Notes πŸ“

  • Caution: Be Careful Using Mainnet,It May Cost You Original Money
  • Security: Be cautious with your key pair and private keys.
  • Devnet: This guide is for the Devnet.
  • Phantom Wallet: Ensure your Phantom Wallet is up to date.

License πŸ“„

This project is MIT licensed.