#!/bin/bash echo "đŸ”Ĩ Sending All Tokens to Burn Address" echo "=====================================" echo "đŸŽ¯ Burn Address: 1nc1nerator11111111111111111111111111111111" echo "📍 Cluster: devnet (safe for testing)" echo "" # Confirm before proceeding read -p "Send ALL tokens to burn address? (type 'yes' to confirm): " confirm if [ "$confirm" != "yes" ]; then echo "❌ Aborted" exit 1 fi echo "đŸ”Ĩ Starting burn process..." echo "" # Set to devnet solana config set --url devnet > /dev/null BURN_ADDRESS="1nc1nerator11111111111111111111111111111111" echo "💰 Wallet: $(solana address)" echo "đŸ”Ĩ Burn Address: $BURN_ADDRESS" echo "" # Get all token accounts echo "📊 Current token accounts:" spl-token accounts --url devnet echo "" # List of token mints to burn MINTS=( "4auc435LJ9AfprLeMziHTJbP8wQmbSi7o4ZpeXdR66jQ" "5xEQF57sR2L3tJBfdiiqaVtepTMa7nQR9uMybMojEY8n" "8cJ8APx5TwwmpeRk4Zhz1Qbyi1T3HHdHUEw4GUJqxAGN" "AK9fXWyDNWurYjZSDhbqBo6fczqLmCLbCZ3vq9Vftsqb" ) # Function to send tokens to burn address burn_tokens() { local mint=$1 echo "đŸ”Ĩ Processing mint: $mint" # Get balance local balance=$(spl-token balance $mint --url devnet 2>/dev/null || echo "0") if [ "$balance" == "0" ] || [ -z "$balance" ]; then echo " â„šī¸ No balance - skipping" return fi echo " 💰 Current balance: $balance" # Create associated token account for burn address if needed echo " 🏭 Creating burn address token account..." spl-token create-account $mint --owner $BURN_ADDRESS --url devnet 2>/dev/null || true # Transfer all tokens to burn address echo " đŸ”Ĩ Sending $balance tokens to burn address..." local result=$(spl-token transfer $mint $balance $BURN_ADDRESS --url devnet --allow-unfunded-recipient 2>&1) if [ $? -eq 0 ]; then echo " ✅ Successfully sent $balance tokens to burn address" # Close the now-empty account to reclaim rent echo " đŸ—‘ī¸ Closing empty token account..." spl-token close $mint --url devnet 2>/dev/null if [ $? -eq 0 ]; then echo " ✅ Token account closed, rent reclaimed" else echo " âš ī¸ Could not close account" fi else echo " ❌ Transfer failed: $result" fi echo "" } # Process each mint for mint in "${MINTS[@]}"; do burn_tokens $mint done echo "đŸŽ¯ Burn process complete!" echo "" echo "📊 Final token account status:" spl-token accounts --url devnet echo "" echo "💰 Final SOL balance:" solana balance --url devnet echo "" echo "đŸ”Ĩ All tokens have been sent to the incinerator!" echo "✅ Ready for clean testing!"