Spaces:
Running
Running
Download index.html from eenergy666/tokenfactory: direct link, hf CLI and curl.
- Browser
- Download file 30.3 kB
-
https://huggingface.co/spaces/eenergy666/tokenfactory/resolve/main/index.html
- Command line
-
hf download hf://spaces/eenergy666/tokenfactory/index.html
-
curl -L -o index.html https://huggingface.co/spaces/eenergy666/tokenfactory/resolve/main/index.html
30.3 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>TokenForge | Mint Your Own Crypto</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/> | |
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
| <style> | |
| @import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap'); | |
| body { | |
| font-family: 'Space Grotesk', sans-serif; | |
| background-color: #0a0a0a; | |
| color: #f5f5f5; | |
| } | |
| .gradient-bg { | |
| background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); | |
| } | |
| .token-card { | |
| background: rgba(255, 255, 255, 0.05); | |
| backdrop-filter: blur(10px); | |
| border: 1px solid rgba(255, 255, 255, 0.1); | |
| transition: all 0.3s ease; | |
| } | |
| .token-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 10px 25px rgba(0, 191, 255, 0.2); | |
| } | |
| .glow { | |
| box-shadow: 0 0 15px rgba(0, 191, 255, 0.5); | |
| } | |
| .network-selector.active { | |
| background: rgba(0, 191, 255, 0.2); | |
| border-color: #00bfff; | |
| } | |
| .printing-animation { | |
| background: linear-gradient(90deg, transparent, rgba(0, 191, 255, 0.3), transparent); | |
| background-size: 200% 100%; | |
| animation: shine 2s infinite; | |
| } | |
| @keyframes shine { | |
| 0% { background-position: -100% 0; } | |
| 100% { background-position: 100% 0; } | |
| } | |
| .token-symbol { | |
| font-family: 'Courier New', monospace; | |
| font-weight: bold; | |
| } | |
| </style> | |
| </head> | |
| <body class="gradient-bg min-h-screen"> | |
| <div class="container mx-auto px-4 py-12"> | |
| <!-- Header --> | |
| <header class="flex flex-col items-center mb-16"> | |
| <div class="flex items-center mb-6"> | |
| <div class="w-12 h-12 rounded-full bg-blue-500 flex items-center justify-center mr-3"> | |
| <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | |
| <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 11c0 3.517-1.009 6.799-2.753 9.571m-3.44-2.04l.054-.09A13.916 13.916 0 008 11a4 4 0 118 0c0 1.017-.07 2.019-.203 3m-2.118 6.844A21.88 21.88 0 0015.171 17m3.839 1.132c.645-2.266.99-4.659.99-7.132A8 8 0 008 4.07M3 15.364c.64-1.319 1-2.8 1-4.364 0-1.457.39-2.823 1.07-4" /> | |
| </svg> | |
| </div> | |
| <h1 class="text-4xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-blue-400 to-cyan-300">TokenForge</h1> | |
| </div> | |
| <p class="text-xl text-center text-gray-300 max-w-2xl"> | |
| The exclusive platform to mint your own cryptocurrency token in seconds. | |
| <span class="font-bold text-blue-300">No coding. No hassle. Just pure digital creation.</span> | |
| </p> | |
| </header> | |
| <!-- Main Content --> | |
| <main class="flex flex-col lg:flex-row gap-8"> | |
| <!-- Token Creation Form --> | |
| <div class="lg:w-1/2"> | |
| <div class="token-card rounded-xl p-8 mb-8"> | |
| <h2 class="text-2xl font-bold mb-6 flex items-center"> | |
| <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 mr-2 text-blue-400" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | |
| <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z" /> | |
| </svg> | |
| Forge Your Token | |
| </h2> | |
| <form id="tokenForm"> | |
| <div class="mb-6"> | |
| <label class="block text-gray-300 mb-2">Token Name</label> | |
| <input type="text" id="tokenName" class="w-full px-4 py-3 bg-gray-800 border border-gray-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="e.g. My Awesome Token"> | |
| </div> | |
| <div class="mb-6"> | |
| <label class="block text-gray-300 mb-2">Token Symbol</label> | |
| <input type="text" id="tokenSymbol" class="w-full px-4 py-3 bg-gray-800 border border-gray-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 token-symbol" placeholder="e.g. MAT" maxlength="5"> | |
| </div> | |
| <div class="mb-6"> | |
| <label class="block text-gray-300 mb-2">Total Supply</label> | |
| <div class="relative"> | |
| <input type="number" id="tokenSupply" class="w-full px-4 py-3 bg-gray-800 border border-gray-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="e.g. 1000000" value="1000000"> | |
| <div class="absolute right-3 top-3 text-gray-400">tokens</div> | |
| </div> | |
| </div> | |
| <div class="mb-8"> | |
| <label class="block text-gray-300 mb-3">Blockchain Network</label> | |
| <div class="flex gap-4"> | |
| <div class="network-selector cursor-pointer rounded-lg p-4 border border-gray-700 flex-1 text-center transition-all" data-network="polygon"> | |
| <div class="flex items-center justify-center"> | |
| <img src="https://cryptologos.cc/logos/polygon-matic-logo.png" alt="Polygon" class="h-6 mr-2"> | |
| <span>Polygon</span> | |
| </div> | |
| <div class="text-xs mt-1 text-gray-400">Low fees</div> | |
| </div> | |
| <div class="network-selector cursor-pointer rounded-lg p-4 border border-gray-700 flex-1 text-center transition-all" data-network="arbitrum"> | |
| <div class="flex items-center justify-center"> | |
| <img src="https://cryptologos.cc/logos/arbitrum-arb-logo.png" alt="Arbitrum" class="h-6 mr-2"> | |
| <span>Arbitrum</span> | |
| </div> | |
| <div class="text-xs mt-1 text-gray-400">High speed</div> | |
| </div> | |
| </div> | |
| <input type="hidden" id="selectedNetwork" value="polygon"> | |
| </div> | |
| <div class="mb-6"> | |
| <label class="block text-gray-300 mb-2">Your Wallet Address</label> | |
| <input type="text" id="walletAddress" class="w-full px-4 py-3 bg-gray-800 border border-gray-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="0x..."> | |
| </div> | |
| <button type="button" id="createTokenBtn" class="w-full py-4 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-lg font-bold text-lg flex items-center justify-center hover:from-blue-500 hover:to-cyan-400 transition-all"> | |
| <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | |
| <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8" /> | |
| </svg> | |
| Mint Token for $20 | |
| </button> | |
| </form> | |
| </div> | |
| <div class="token-card rounded-xl p-6"> | |
| <h3 class="text-lg font-semibold mb-4 flex items-center"> | |
| <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2 text-blue-400" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | |
| <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> | |
| </svg> | |
| What You Get | |
| </h3> | |
| <ul class="space-y-3 text-gray-300"> | |
| <li class="flex items-start"> | |
| <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-green-400 mr-2 mt-0.5" viewBox="0 0 20 20" fill="currentColor"> | |
| <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd" /> | |
| </svg> | |
| <span>Your own ERC-20 token deployed on your chosen network</span> | |
| </li> | |
| <li class="flex items-start"> | |
| <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-green-400 mr-2 mt-0.5" viewBox="0 0 20 20" fill="currentColor"> | |
| <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd" /> | |
| </svg> | |
| <span>100% of the total supply minted to your wallet</span> | |
| </li> | |
| <li class="flex items-start"> | |
| <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-green-400 mr-2 mt-0.5" viewBox="0 0 20 20" fill="currentColor"> | |
| <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd" /> | |
| </svg> | |
| <span>Verified contract source code</span> | |
| </li> | |
| <li class="flex items-start"> | |
| <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-green-400 mr-2 mt-0.5" viewBox="0 0 20 20" fill="currentColor"> | |
| <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd" /> | |
| </svg> | |
| <span>Lifetime access to token management dashboard</span> | |
| </li> | |
| </ul> | |
| </div> | |
| </div> | |
| <!-- Token Preview --> | |
| <div class="lg:w-1/2"> | |
| <div class="token-card rounded-xl p-8 sticky top-8"> | |
| <div class="flex justify-between items-center mb-6"> | |
| <h2 class="text-2xl font-bold">Token Preview</h2> | |
| <div class="text-xs px-3 py-1 bg-blue-900 text-blue-300 rounded-full">LIVE SIMULATION</div> | |
| </div> | |
| <div class="mb-8"> | |
| <div class="flex items-center justify-between mb-4"> | |
| <div class="flex items-center"> | |
| <div class="w-12 h-12 rounded-full bg-gradient-to-br from-blue-500 to-cyan-400 flex items-center justify-center text-white font-bold mr-3" id="tokenSymbolPreview">MAT</div> | |
| <div> | |
| <div class="font-bold" id="tokenNamePreview">My Awesome Token</div> | |
| <div class="text-sm text-gray-400">ERC-20 Token</div> | |
| </div> | |
| </div> | |
| <div class="text-right"> | |
| <div class="text-sm text-gray-400">Network</div> | |
| <div class="font-bold" id="networkPreview">Polygon</div> | |
| </div> | |
| </div> | |
| <div class="h-1 bg-gray-800 rounded-full mb-4"> | |
| <div class="h-full bg-gradient-to-r from-blue-500 to-cyan-400 rounded-full w-full"></div> | |
| </div> | |
| <div class="flex justify-between text-sm text-gray-400 mb-1"> | |
| <div>Total Supply</div> | |
| <div id="supplyPreview">1,000,000</div> | |
| </div> | |
| </div> | |
| <div class="mb-8"> | |
| <canvas id="tokenChart" height="150"></canvas> | |
| </div> | |
| <div class="printing-animation rounded-lg p-6 bg-gray-800/50 mb-6"> | |
| <div class="flex items-center"> | |
| <svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 text-blue-400 mr-3 animate-pulse" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | |
| <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10" /> | |
| </svg> | |
| <div> | |
| <div class="font-semibold">Token Minting Simulation</div> | |
| <div class="text-sm text-gray-400">Preparing your digital asset...</div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-gray-900 rounded-lg p-6"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <div class="text-gray-300">Transaction Summary</div> | |
| <div class="text-sm px-3 py-1 bg-gray-800 text-gray-300 rounded-full">One-time fee</div> | |
| </div> | |
| <div class="space-y-3"> | |
| <div class="flex justify-between"> | |
| <div class="text-gray-400">Token Creation</div> | |
| <div class="font-medium">$20.00</div> | |
| </div> | |
| <div class="flex justify-between"> | |
| <div class="text-gray-400">Network Fees</div> | |
| <div class="font-medium">~$0.50</div> | |
| </div> | |
| <div class="h-px bg-gray-800 my-2"></div> | |
| <div class="flex justify-between text-lg"> | |
| <div>Total</div> | |
| <div class="font-bold text-blue-400">$20.50</div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| <!-- Recently Created Tokens --> | |
| <section class="mt-16"> | |
| <h2 class="text-2xl font-bold mb-6 flex items-center"> | |
| <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 mr-2 text-blue-400" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | |
| <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7h8m0 0v8m0-8l-8 8-4-4-6 6" /> | |
| </svg> | |
| Recently Forged Tokens | |
| </h2> | |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"> | |
| <div class="token-card rounded-lg p-4"> | |
| <div class="flex items-center mb-3"> | |
| <div class="w-8 h-8 rounded-full bg-purple-500 flex items-center justify-center text-white font-bold text-xs mr-2">BFF</div> | |
| <div class="font-medium">BestFriendCoin</div> | |
| </div> | |
| <div class="flex justify-between text-sm text-gray-400"> | |
| <div>Polygon</div> | |
| <div>10M supply</div> | |
| </div> | |
| </div> | |
| <div class="token-card rounded-lg p-4"> | |
| <div class="flex items-center mb-3"> | |
| <div class="w-8 h-8 rounded-full bg-yellow-500 flex items-center justify-center text-white font-bold text-xs mr-2">GMR</div> | |
| <div class="font-medium">GamerToken</div> | |
| </div> | |
| <div class="flex justify-between text-sm text-gray-400"> | |
| <div>Arbitrum</div> | |
| <div>100M supply</div> | |
| </div> | |
| </div> | |
| <div class="token-card rounded-lg p-4"> | |
| <div class="flex items-center mb-3"> | |
| <div class="w-8 h-8 rounded-full bg-green-500 flex items-center justify-center text-white font-bold text-xs mr-2">ECO</div> | |
| <div class="font-medium">EcoRewards</div> | |
| </div> | |
| <div class="flex justify-between text-sm text-gray-400"> | |
| <div>Polygon</div> | |
| <div>1B supply</div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| </div> | |
| <!-- Payment Modal --> | |
| <div id="paymentModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 hidden"> | |
| <div class="token-card rounded-xl p-8 max-w-md w-full mx-4 animate__animated animate__fadeInUp"> | |
| <div class="flex justify-between items-center mb-6"> | |
| <h3 class="text-xl font-bold">Complete Payment</h3> | |
| <button id="closeModal" class="text-gray-400 hover:text-white"> | |
| <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | |
| <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" /> | |
| </svg> | |
| </button> | |
| </div> | |
| <div class="mb-6"> | |
| <div class="flex items-center justify-between mb-4"> | |
| <div class="text-gray-300">You're creating</div> | |
| <div class="font-bold" id="modalTokenName">My Awesome Token (MAT)</div> | |
| </div> | |
| <div class="flex items-center justify-between mb-4"> | |
| <div class="text-gray-300">On network</div> | |
| <div class="font-bold" id="modalNetwork">Polygon</div> | |
| </div> | |
| <div class="flex items-center justify-between"> | |
| <div class="text-gray-300">Total supply</div> | |
| <div class="font-bold" id="modalSupply">1,000,000 tokens</div> | |
| </div> | |
| </div> | |
| <div class="mb-6"> | |
| <div class="text-center text-sm text-gray-400 mb-3">Choose payment method</div> | |
| <div class="grid grid-cols-3 gap-3"> | |
| <button class="py-3 bg-gray-800 rounded-lg flex flex-col items-center justify-center hover:bg-gray-700 transition-all"> | |
| <img src="https://cryptologos.cc/logos/usd-coin-usdc-logo.png" alt="USDC" class="h-8 mb-1"> | |
| <span class="text-xs">USDC</span> | |
| </button> | |
| <button class="py-3 bg-gray-800 rounded-lg flex flex-col items-center justify-center hover:bg-gray-700 transition-all"> | |
| <img src="https://cryptologos.cc/logos/tether-usdt-logo.png" alt="USDT" class="h-8 mb-1"> | |
| <span class="text-xs">USDT</span> | |
| </button> | |
| <button class="py-3 bg-gray-800 rounded-lg flex flex-col items-center justify-center hover:bg-gray-700 transition-all"> | |
| <img src="https://cryptologos.cc/logos/ethereum-eth-logo.png" alt="ETH" class="h-8 mb-1"> | |
| <span class="text-xs">ETH</span> | |
| </button> | |
| </div> | |
| </div> | |
| <button id="confirmPayment" class="w-full py-3 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-lg font-bold flex items-center justify-center hover:from-blue-500 hover:to-cyan-400 transition-all"> | |
| <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | |
| <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /> | |
| </svg> | |
| Pay $20.50 | |
| </button> | |
| </div> | |
| </div> | |
| <!-- Success Modal --> | |
| <div id="successModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50 hidden"> | |
| <div class="token-card rounded-xl p-8 max-w-md w-full mx-4 text-center animate__animated animate__zoomIn"> | |
| <div class="w-16 h-16 bg-green-500/20 rounded-full flex items-center justify-center mx-auto mb-6"> | |
| <svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 text-green-400" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | |
| <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" /> | |
| </svg> | |
| </div> | |
| <h3 class="text-xl font-bold mb-2">Token Created Successfully!</h3> | |
| <p class="text-gray-300 mb-6">Your token has been deployed to the blockchain.</p> | |
| <div class="bg-gray-800 rounded-lg p-4 mb-6 text-left"> | |
| <div class="flex justify-between mb-2"> | |
| <div class="text-gray-400">Token Address:</div> | |
| <button class="text-blue-400 text-sm flex items-center"> | |
| <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | |
| <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3" /> | |
| </svg> | |
| Copy | |
| </button> | |
| </div> | |
| <div class="text-sm font-mono text-gray-300 truncate">0x742d35Cc6634C0532925a3b844Bc454e4438f44e</div> | |
| </div> | |
| <button id="viewDashboard" class="w-full py-3 bg-gradient-to-r from-blue-600 to-cyan-500 rounded-lg font-bold flex items-center justify-center hover:from-blue-500 hover:to-cyan-400 transition-all mb-3"> | |
| Go to Token Dashboard | |
| </button> | |
| <button id="closeSuccessModal" class="w-full py-3 bg-gray-800 rounded-lg font-bold hover:bg-gray-700 transition-all"> | |
| Close | |
| </button> | |
| </div> | |
| </div> | |
| <script> | |
| // Initialize token chart | |
| const ctx = document.getElementById('tokenChart').getContext('2d'); | |
| const tokenChart = new Chart(ctx, { | |
| type: 'line', | |
| data: { | |
| labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'], | |
| datasets: [{ | |
| label: 'Token Simulation', | |
| data: [0, 0.5, 2, 4, 8, 20], | |
| borderColor: '#00bfff', | |
| backgroundColor: 'rgba(0, 191, 255, 0.1)', | |
| borderWidth: 2, | |
| tension: 0.4, | |
| fill: true | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| plugins: { | |
| legend: { | |
| display: false | |
| } | |
| }, | |
| scales: { | |
| y: { | |
| beginAtZero: true, | |
| grid: { | |
| color: 'rgba(255, 255, 255, 0.05)' | |
| }, | |
| ticks: { | |
| color: 'rgba(255, 255, 255, 0.6)' | |
| } | |
| }, | |
| x: { | |
| grid: { | |
| color: 'rgba(255, 255, 255, 0.05)' | |
| }, | |
| ticks: { | |
| color: 'rgba(255, 255, 255, 0.6)' | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| // Network selection | |
| document.querySelectorAll('.network-selector').forEach(el => { | |
| el.addEventListener('click', function() { | |
| document.querySelectorAll('.network-selector').forEach(el => el.classList.remove('active')); | |
| this.classList.add('active'); | |
| const network = this.getAttribute('data-network'); | |
| document.getElementById('selectedNetwork').value = network; | |
| document.getElementById('networkPreview').textContent = | |
| network === 'polygon' ? 'Polygon' : 'Arbitrum'; | |
| }); | |
| }); | |
| // Form input updates | |
| document.getElementById('tokenName').addEventListener('input', function() { | |
| document.getElementById('tokenNamePreview').textContent = this.value || 'My Awesome Token'; | |
| document.getElementById('modalTokenName').textContent = | |
| (this.value || 'My Awesome Token') + | |
| ' (' + (document.getElementById('tokenSymbol').value || 'MAT') + ')'; | |
| }); | |
| document.getElementById('tokenSymbol').addEventListener('input', function() { | |
| const symbol = this.value || 'MAT'; | |
| document.getElementById('tokenSymbolPreview').textContent = symbol.substring(0, 3); | |
| document.getElementById('modalTokenName').textContent = | |
| (document.getElementById('tokenName').value || 'My Awesome Token') + | |
| ' (' + symbol + ')'; | |
| }); | |
| document.getElementById('tokenSupply').addEventListener('input', function() { | |
| const supply = this.value ? parseInt(this.value).toLocaleString() : '1,000,000'; | |
| document.getElementById('supplyPreview').textContent = supply; | |
| document.getElementById('modalSupply').textContent = supply + ' tokens'; | |
| }); | |
| // Create token button | |
| document.getElementById('createTokenBtn').addEventListener('click', function() { | |
| const tokenName = document.getElementById('tokenName').value; | |
| const tokenSymbol = document.getElementById('tokenSymbol').value; | |
| const walletAddress = document.getElementById('walletAddress').value; | |
| if (!tokenName || !tokenSymbol || !walletAddress) { | |
| alert('Please fill in all fields'); | |
| return; | |
| } | |
| // Update modal with current values | |
| document.getElementById('modalTokenName').textContent = | |
| tokenName + ' (' + tokenSymbol + ')'; | |
| document.getElementById('modalNetwork').textContent = | |
| document.getElementById('selectedNetwork').value === 'polygon' ? 'Polygon' : 'Arbitrum'; | |
| document.getElementById('modalSupply').textContent = | |
| parseInt(document.getElementById('tokenSupply').value).toLocaleString() + ' tokens'; | |
| // Show payment modal | |
| document.getElementById('paymentModal').classList.remove('hidden'); | |
| }); | |
| // Close modals | |
| document.getElementById('closeModal').addEventListener('click', function() { | |
| document.getElementById('paymentModal').classList.add('hidden'); | |
| }); | |
| document.getElementById('closeSuccessModal').addEventListener('click', function() { | |
| document.getElementById('successModal').classList.add('hidden'); | |
| }); | |
| // Confirm payment | |
| document.getElementById('confirmPayment').addEventListener('click', function() { | |
| document.getElementById('paymentModal').classList.add('hidden'); | |
| // Simulate processing | |
| setTimeout(() => { | |
| document.getElementById('successModal').classList.remove('hidden'); | |
| }, 1500); | |
| }); | |
| // View dashboard | |
| document.getElementById('viewDashboard').addEventListener('click', function() { | |
| alert('Redirecting to token dashboard...'); | |
| document.getElementById('successModal').classList.add('hidden'); | |
| }); | |
| // Initialize with Polygon selected | |
| document.querySelector('.network-selector[data-network="polygon"]').classList.add('active'); | |
| </script> | |
| <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=eenergy666/tokenfactory" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |