This guide demonstrates how to create Solana Program Library (SPL) tokens on the SOON testnet using the Metaplex Foundation's UMI framework and MPL Token Metadata program.
- Node.js (v14 or higher)
- npm or yarn package manager
- Basic understanding of Solana and SPL tokens
Install the required dependencies:
pnpm i
- Clone this repository or create a new directory for your project
- Make sure you have a funded wallet on SOON testnet
The code uses the following main components:
- UMI instance connected to SOON testnet
- Payer keypair for signing transactions
- Mint signer for the new token
umi
: UMI instance connected to SOON testnet RPC endpointpayerSecretKey
: Your wallet's secret key (Keep this secure!)mint
: Newly generated token mint address
The token is created with the following parameters:
- Name: "BONK"
- Decimals: 7
- Seller Fee: 5.5%
- URI: Points to metadata stored on Arweave
-
Replace the
payerSecretKey
with your own wallet's secret key -
Modify the token parameters in the
main()
function as needed:name
: Your token's nameuri
: Link to your token's metadatasellerFeeBasisPoints
: Seller fee percentagedecimals
: Number of decimal places
-
Run the script:
pnpm start
The script will output:
- Payer's SOL balance
- Payer's public key
- New token's mint address
- Transaction hash
- Never commit your secret key to version control
- Store sensitive information in environment variables
- Ensure your wallet has sufficient SOL for transaction fees
The code is configured for SOON testnet. To use different networks:
Feel free to submit issues and enhancement requests!