Metaplex
How to Create NFTs on SOON
This guide demonstrates how to create NFTs on the SOON using the Metaplex Foundation’s UMI framework, MPL Token Metadata program, and Pinata for IPFS storage.
Prerequisites
Before you begin, make sure you have:
- Node.js installed
- A funded wallet on SOON testnet
- Pinata account for IPFS storage
Setting up Pinata
- Visit Pinata Cloud and create an account
- Once registered, go to
API Keys
section - Create a new API key with the permissions you need
- Save your JWT token and Gateway token
- Create a
.env
file in your project root:
Implementation
Let’s break down the code that creates NFTs on SOON:
Setting up the Wallet
Creating NFT Metadata
Uploading to IPFS using Pinata
Creating the NFT
Running the Code
- Install dependencies:
-
Set up your environment variables in
.env
file -
Replace the placeholder values:
- Your wallet’s secret key
- Your NFT metadata
- Your Pinata gateway
-
Run the script:
Output
After successful execution, you’ll see:
- Your wallet balance
- IPFS upload confirmation
- Metadata URI
- Transaction signature
- NFT mint address
Security Considerations
- Never commit your
.env
file or expose your secret keys - Store sensitive information securely
- Ensure your wallet has sufficient SOON tokens for transactions
Network Selection
The code is configured for SOON testnet. For different networks, update the RPC URL:
- Devnet:
https://rpc.devnet.soo.network/rpc
- Testnet:
https://rpc.testnet.soo.network/rpc
Additional Resources
- Metaplex Documentation
- Pinata Documentation
- You can find the complete code for this guide on GitHub.