Date: 2026-04-03
Category: Technical Validation
Status: Building
Test mint-nft.js on Solana devnet before mainnet deployment. Verify:
1. Wallet connection works
2. Metadata uploads to decentralized storage
3. NFT mints successfully
4. On-chain verification passes
5. Marketplace compatibility (OpenSea/MagicEden)
Change in mint-nft.js:
const SOLANA_NETWORK = 'devnet'; // Was: 'mainnet-beta'
const RPC_ENDPOINT = clusterApiUrl('devnet');
Devnet wallet:
Command:
node -e "
const { Connection, clusterApiUrl, Keypair } = require('@solana/web3.js');
const connection = new Connection(clusterApiUrl('devnet'), 'confirmed');
const testWallet = Keypair.generate();
console.log('Test wallet:', testWallet.publicKey.toString());
connection.getBalance(testWallet.publicKey).then(bal => console.log('Balance:', bal));
"
Expected: Test wallet address, balance 0 (before funding)
Command:
cd /var/www/jazzcigarettes
node -e "
const { generateJazzMetadata } = require('./mint-nft.js');
const testArt = {
key: 'Bb',
tempo: '180 BPM',
style: 'Bebop',
complexity: 'High',
imageURI: 'https://placeholder.com/test.png'
};
const metadata = generateJazzMetadata(testArt);
console.log(JSON.stringify(metadata, null, 2));
"
Expected: Valid JSON metadata with all fields
Script: test-mint-devnet.js
const { Connection, clusterApiUrl, Keypair } = require('@solana/web3.js');
const { mintJazzNFT } = require('./mint-nft.js');
async function test() {
const connection = new Connection(clusterApiUrl('devnet'), 'confirmed');
const testWallet = Keypair.generate();
// Fund wallet from faucet first (manual step)
console.log('Fund this wallet with devnet SOL:', testWallet.publicKey.toString());
console.log('Faucet: https://solfaucet.com');
console.log('Waiting 30 seconds for funding...');
await new Promise(resolve => setTimeout(resolve, 30000));
const artData = {
key: 'Bb',
tempo: '180 BPM',
style: 'Bebop',
complexity: 'High',
imageURI: 'https://via.placeholder.com/800x800.png?text=Jazz+Test'
};
console.log('Minting test NFT...');
const result = await mintJazzNFT(connection, testWallet, artData);
console.log('Result:', result);
if (result.success) {
console.log('โ
MINT SUCCESS');
console.log('Mint address:', result.mintAddress);
console.log('Explorer:', result.explorerUrl);
} else {
console.log('โ MINT FAILED');
console.log('Error:', result.error);
}
}
test().catch(console.error);
Run:
cd /var/www/jazzcigarettes
node test-mint-devnet.js
Expected output:
Fund this wallet with devnet SOL: [address]
Waiting 30 seconds...
Minting test NFT...
Metadata uploaded: arweave.net/...
NFT minted successfully!
โ
MINT SUCCESS
Mint address: [Solana address]
Explorer: https://explorer.solana.com/address/[address]?cluster=devnet
Command:
# After mint succeeds, verify on Solana explorer
# Visit: https://explorer.solana.com/address/[MINT_ADDRESS]?cluster=devnet
# Check:
# - NFT exists
# - Metadata URI correct
# - Owner = test wallet
# - Creator = treasury wallet
Check:
Issue 1: @metaplex-foundation/js deprecated
Issue 2: Arweave upload cost
Issue 3: Wallet adapter integration
Current setup:
Missing piece: Backend API to call mint-nft.js
Flow should be:
1. Customer connects wallet (frontend, mint-wallet.js)
2. Customer generates art preview (frontend, gen-mint-art.js)
3. Customer clicks "Mint" โ sends payment (frontend)
4. Backend detects payment โ calls mint-nft.js โ mints NFT
5. NFT sent to customer wallet
Current flow (broken):
Solution: Use Metaplex Candy Machine OR manual two-step:
1. Customer pays treasury
2. Backend mints NFT and transfers to customer
Option A: Fix architecture now (1-2 days)
Option B: Manual minting for first sales (tonight)
Option C: Use Candy Machine (3-5 days)
For first $10 sale: Option B (manual)
For scale: Option A (backend API)
1. Tonight: Run devnet test (Test 3)
2. Verify: Mint succeeds, NFT on-chain
3. Deploy: Change to mainnet, test with own wallet
4. Distribute: Post to Discord/Reddit with "DM me your wallet after payment"
5. First sale: Manual mint + transfer
6. Iterate: Build backend after 5 manual sales prove demand
Receipt: Devnet test plan complete. Architecture gap identified (frontend โ backend). Manual minting recommended for first sales. Backend API for scale.
Testing now.