Add more features to the testnet app, as a crypto developer - Follow Up Deployment
Browse files- index.html +282 -4
index.html
CHANGED
@@ -46,9 +46,26 @@
|
|
46 |
<h1 class="text-2xl md:text-3xl font-bold">FlameBorn Testnet Suite</h1>
|
47 |
</div>
|
48 |
<div class="flex items-center space-x-4">
|
49 |
-
<
|
50 |
-
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
</div>
|
53 |
</div>
|
54 |
</div>
|
@@ -56,6 +73,34 @@
|
|
56 |
|
57 |
<!-- Main Content -->
|
58 |
<main class="container mx-auto px-4 py-8">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
<!-- Overview Section -->
|
60 |
<section class="mb-12 bg-white rounded-xl shadow-md p-6">
|
61 |
<h2 class="text-2xl font-bold text-gray-800 mb-4 flex items-center">
|
@@ -112,6 +157,28 @@
|
|
112 |
</div>
|
113 |
</div>
|
114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
<!-- Test Cards -->
|
116 |
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
117 |
<!-- Contract Metadata -->
|
@@ -302,6 +369,104 @@
|
|
302 |
</div>
|
303 |
</section>
|
304 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
<!-- Code Snippets -->
|
306 |
<section class="mb-12 bg-white rounded-xl shadow-md p-6">
|
307 |
<h2 class="text-2xl font-bold text-gray-800 mb-6 flex items-center">
|
@@ -386,6 +551,66 @@
|
|
386 |
</div>
|
387 |
</section>
|
388 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
389 |
<!-- Manual QA Section -->
|
390 |
<section class="bg-white rounded-xl shadow-md p-6 mb-12">
|
391 |
<h2 class="text-2xl font-bold text-gray-800 mb-6 flex items-center">
|
@@ -486,12 +711,65 @@
|
|
486 |
</div>
|
487 |
</div>
|
488 |
<div class="border-t border-white border-opacity-20 mt-6 pt-6 text-sm text-center md:text-left">
|
489 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
490 |
</div>
|
491 |
</div>
|
492 |
</footer>
|
493 |
|
494 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
495 |
// Simulate progress bar animation
|
496 |
document.addEventListener('DOMContentLoaded', function() {
|
497 |
const progressBar = document.querySelector('.progress-bar');
|
|
|
46 |
<h1 class="text-2xl md:text-3xl font-bold">FlameBorn Testnet Suite</h1>
|
47 |
</div>
|
48 |
<div class="flex items-center space-x-4">
|
49 |
+
<button id="connectWallet" class="px-3 py-1 bg-white text-orange-600 rounded-full text-sm font-medium hover:bg-opacity-100 transition-all">
|
50 |
+
<i class="fas fa-wallet mr-1"></i> Connect Wallet
|
51 |
+
</button>
|
52 |
+
<div class="relative group">
|
53 |
+
<span class="px-3 py-1 bg-white bg-opacity-20 rounded-full text-sm font-medium flex items-center">
|
54 |
+
<span class="w-2 h-2 rounded-full bg-green-400 mr-2 animate-pulse"></span>
|
55 |
+
Testnet LIVE
|
56 |
+
</span>
|
57 |
+
<div class="absolute hidden group-hover:block bg-gray-800 text-xs p-2 rounded shadow-lg z-10 w-48">
|
58 |
+
ChainID: 9818 (FlameBorn Testnet)<br>
|
59 |
+
RPC: https://rpc.flameborn.io<br>
|
60 |
+
Faucet: /faucet
|
61 |
+
</div>
|
62 |
+
</div>
|
63 |
+
<a href="#deploy" class="px-3 py-1 bg-white text-orange-600 rounded-full text-sm font-medium hover:bg-opacity-100 transition-all">
|
64 |
+
<i class="fas fa-rocket mr-1"></i> Quick Deploy
|
65 |
+
</a>
|
66 |
+
<a href="https://github.com/flameborn/testnet" target="_blank" class="px-3 py-1 bg-white bg-opacity-20 hover:bg-opacity-30 rounded-full text-sm font-medium transition-all">
|
67 |
+
<i class="fab fa-github mr-1"></i> GitHub
|
68 |
+
</a>
|
69 |
</div>
|
70 |
</div>
|
71 |
</div>
|
|
|
73 |
|
74 |
<!-- Main Content -->
|
75 |
<main class="container mx-auto px-4 py-8">
|
76 |
+
<!-- Network Status Section -->
|
77 |
+
<section class="mb-6 bg-white rounded-xl shadow-md p-6">
|
78 |
+
<h2 class="text-2xl font-bold text-gray-800 mb-4 flex items-center">
|
79 |
+
<i class="fas fa-network-wired mr-2 text-blue-500"></i> Network Status
|
80 |
+
</h2>
|
81 |
+
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
|
82 |
+
<div class="bg-gray-50 p-4 rounded-lg">
|
83 |
+
<p class="text-gray-500 text-sm">Current Block</p>
|
84 |
+
<p class="font-bold text-gray-800" id="currentBlock">Loading...</p>
|
85 |
+
</div>
|
86 |
+
<div class="bg-gray-50 p-4 rounded-lg">
|
87 |
+
<p class="text-gray-500 text-sm">Gas Price</p>
|
88 |
+
<p class="font-bold text-gray-800" id="gasPrice">Loading...</p>
|
89 |
+
</div>
|
90 |
+
<div class="bg-gray-50 p-4 rounded-lg">
|
91 |
+
<p class="text-gray-500 text-sm">Chain ID</p>
|
92 |
+
<p class="font-bold text-gray-800">9818</p>
|
93 |
+
</div>
|
94 |
+
<div class="bg-gray-50 p-4 rounded-lg">
|
95 |
+
<p class="text-gray-500 text-sm">Node Status</p>
|
96 |
+
<p class="font-bold text-gray-800 flex items-center">
|
97 |
+
<span class="w-2 h-2 rounded-full bg-green-500 mr-2 animate-pulse"></span>
|
98 |
+
Synced
|
99 |
+
</p>
|
100 |
+
</div>
|
101 |
+
</div>
|
102 |
+
</section>
|
103 |
+
|
104 |
<!-- Overview Section -->
|
105 |
<section class="mb-12 bg-white rounded-xl shadow-md p-6">
|
106 |
<h2 class="text-2xl font-bold text-gray-800 mb-4 flex items-center">
|
|
|
157 |
</div>
|
158 |
</div>
|
159 |
|
160 |
+
<!-- Network Selector -->
|
161 |
+
<div class="bg-white rounded-xl shadow-md p-4 mb-6 flex flex-wrap items-center justify-between">
|
162 |
+
<div class="mb-4 md:mb-0">
|
163 |
+
<h3 class="font-semibold text-gray-800">Select Test Network</h3>
|
164 |
+
<p class="text-sm text-gray-600">Run tests across multiple EVM chains</p>
|
165 |
+
</div>
|
166 |
+
<div class="flex flex-wrap gap-2">
|
167 |
+
<button class="px-3 py-1 bg-orange-500 text-white rounded-full text-sm flex items-center">
|
168 |
+
<i class="fas fa-fire mr-1"></i> FlameBorn
|
169 |
+
</button>
|
170 |
+
<button class="px-3 py-1 bg-blue-100 text-blue-600 rounded-full text-sm flex items-center">
|
171 |
+
<img src="https://cryptologos.cc/logos/ethereum-eth-logo.png" class="w-4 h-4 mr-1"> Sepolia
|
172 |
+
</button>
|
173 |
+
<button class="px-3 py-1 bg-yellow-100 text-yellow-600 rounded-full text-sm flex items-center">
|
174 |
+
<img src="https://cryptologos.cc/logos/polygon-matic-logo.png" class="w-4 h-4 mr-1"> Mumbai
|
175 |
+
</button>
|
176 |
+
<button class="px-3 py-1 bg-purple-100 text-purple-600 rounded-full text-sm flex items-center">
|
177 |
+
<img src="https://cryptologos.cc/logos/bnb-bnb-logo.png" class="w-4 h-4 mr-1"> BSC Testnet
|
178 |
+
</button>
|
179 |
+
</div>
|
180 |
+
</div>
|
181 |
+
|
182 |
<!-- Test Cards -->
|
183 |
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
184 |
<!-- Contract Metadata -->
|
|
|
369 |
</div>
|
370 |
</section>
|
371 |
|
372 |
+
<!-- Contract Verification -->
|
373 |
+
<section class="mb-12 bg-white rounded-xl shadow-md p-6">
|
374 |
+
<h2 class="text-2xl font-bold text-gray-800 mb-6 flex items-center">
|
375 |
+
<i class="fas fa-check-circle mr-2 text-green-500"></i> Contract Verification
|
376 |
+
</h2>
|
377 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
378 |
+
<div class="bg-gray-50 p-6 rounded-lg">
|
379 |
+
<h3 class="font-semibold text-gray-700 mb-4">Verify Contract</h3>
|
380 |
+
<div class="space-y-4">
|
381 |
+
<div>
|
382 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Contract Address</label>
|
383 |
+
<input type="text" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500">
|
384 |
+
</div>
|
385 |
+
<div>
|
386 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Compiler Version</label>
|
387 |
+
<select class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500">
|
388 |
+
<option>0.8.19</option>
|
389 |
+
<option>0.8.20</option>
|
390 |
+
<option>0.8.21</option>
|
391 |
+
</select>
|
392 |
+
</div>
|
393 |
+
<button class="w-full py-2 bg-orange-500 hover:bg-orange-600 text-white rounded-md font-medium">
|
394 |
+
Verify & Publish
|
395 |
+
</button>
|
396 |
+
</div>
|
397 |
+
</div>
|
398 |
+
<div class="bg-gray-50 p-6 rounded-lg">
|
399 |
+
<h3 class="font-semibold text-gray-700 mb-4">Verified Contracts</h3>
|
400 |
+
<div class="overflow-x-auto">
|
401 |
+
<table class="min-w-full divide-y divide-gray-200">
|
402 |
+
<thead>
|
403 |
+
<tr>
|
404 |
+
<th class="px-4 py-2 text-left text-xs font-medium text-gray-500">Address</th>
|
405 |
+
<th class="px-4 py-2 text-left text-xs font-medium text-gray-500">Date</th>
|
406 |
+
</tr>
|
407 |
+
</thead>
|
408 |
+
<tbody class="divide-y divide-gray-200">
|
409 |
+
<tr>
|
410 |
+
<td class="px-4 py-2 text-sm text-gray-500">0x8f7a...3e4b</td>
|
411 |
+
<td class="px-4 py-2 text-sm text-gray-500">2023-11-15</td>
|
412 |
+
</tr>
|
413 |
+
<tr>
|
414 |
+
<td class="px-4 py-2 text-sm text-gray-500">0x5b32...9d1f</td>
|
415 |
+
<td class="px-4 py-2 text-sm text-gray-500">2023-11-14</td>
|
416 |
+
</tr>
|
417 |
+
</tbody>
|
418 |
+
</table>
|
419 |
+
</div>
|
420 |
+
</div>
|
421 |
+
</div>
|
422 |
+
</section>
|
423 |
+
|
424 |
+
<!-- Faucet Section -->
|
425 |
+
<section class="mb-12 bg-white rounded-xl shadow-md p-6" id="faucet">
|
426 |
+
<h2 class="text-2xl font-bold text-gray-800 mb-6 flex items-center">
|
427 |
+
<i class="fas fa-faucet mr-2 text-blue-500"></i> Testnet Faucet
|
428 |
+
</h2>
|
429 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
430 |
+
<div class="bg-gradient-to-br from-blue-50 to-indigo-50 p-6 rounded-lg">
|
431 |
+
<h3 class="font-semibold text-gray-700 mb-4">Request Test Tokens</h3>
|
432 |
+
<div class="space-y-4">
|
433 |
+
<div>
|
434 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Wallet Address</label>
|
435 |
+
<input type="text" id="faucetAddress" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
|
436 |
+
</div>
|
437 |
+
<div>
|
438 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Token Type</label>
|
439 |
+
<select class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
|
440 |
+
<option>FLB (Native Token)</option>
|
441 |
+
<option>Test USDT</option>
|
442 |
+
<option>Test USDC</option>
|
443 |
+
</select>
|
444 |
+
</div>
|
445 |
+
<button id="requestFaucet" class="w-full py-2 bg-blue-500 hover:bg-blue-600 text-white rounded-md font-medium">
|
446 |
+
Request 1000 FLB
|
447 |
+
</button>
|
448 |
+
</div>
|
449 |
+
</div>
|
450 |
+
<div class="bg-gray-50 p-6 rounded-lg">
|
451 |
+
<h3 class="font-semibold text-gray-700 mb-4">Faucet Stats</h3>
|
452 |
+
<div class="space-y-4">
|
453 |
+
<div class="flex justify-between">
|
454 |
+
<span class="text-sm text-gray-600">Total Distributed</span>
|
455 |
+
<span class="font-medium">5,420,000 FLB</span>
|
456 |
+
</div>
|
457 |
+
<div class="flex justify-between">
|
458 |
+
<span class="text-sm text-gray-600">Requests Today</span>
|
459 |
+
<span class="font-medium">142</span>
|
460 |
+
</div>
|
461 |
+
<div class="flex justify-between">
|
462 |
+
<span class="text-sm text-gray-600">Your Daily Limit</span>
|
463 |
+
<span class="font-medium">5,000 FLB</span>
|
464 |
+
</div>
|
465 |
+
</div>
|
466 |
+
</div>
|
467 |
+
</div>
|
468 |
+
</section>
|
469 |
+
|
470 |
<!-- Code Snippets -->
|
471 |
<section class="mb-12 bg-white rounded-xl shadow-md p-6">
|
472 |
<h2 class="text-2xl font-bold text-gray-800 mb-6 flex items-center">
|
|
|
551 |
</div>
|
552 |
</section>
|
553 |
|
554 |
+
<!-- Leaderboard Section -->
|
555 |
+
<section class="bg-white rounded-xl shadow-md p-6 mb-8">
|
556 |
+
<h2 class="text-2xl font-bold text-gray-800 mb-6 flex items-center">
|
557 |
+
<i class="fas fa-trophy mr-2 text-yellow-500"></i> Testnet Leaderboard
|
558 |
+
</h2>
|
559 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
560 |
+
<div class="bg-gradient-to-br from-orange-50 to-red-50 p-4 rounded-lg">
|
561 |
+
<h3 class="font-semibold text-gray-800 mb-2">Top Developers</h3>
|
562 |
+
<ol class="space-y-2 text-sm">
|
563 |
+
<li class="flex justify-between">
|
564 |
+
<span>0x8f7a...3e4b</span>
|
565 |
+
<span class="font-medium">142 tests</span>
|
566 |
+
</li>
|
567 |
+
<li class="flex justify-between">
|
568 |
+
<span>0x5b32...9d1f</span>
|
569 |
+
<span class="font-medium">118 tests</span>
|
570 |
+
</li>
|
571 |
+
<li class="flex justify-between">
|
572 |
+
<span>0x1c7d...4a2e</span>
|
573 |
+
<span class="font-medium">97 tests</span>
|
574 |
+
</li>
|
575 |
+
</ol>
|
576 |
+
</div>
|
577 |
+
<div class="bg-gradient-to-br from-blue-50 to-indigo-50 p-4 rounded-lg">
|
578 |
+
<h3 class="font-semibold text-gray-800 mb-2">Bug Bounties</h3>
|
579 |
+
<ol class="space-y-2 text-sm">
|
580 |
+
<li class="flex justify-between">
|
581 |
+
<span>Critical</span>
|
582 |
+
<span class="font-medium">5,000 FLB</span>
|
583 |
+
</li>
|
584 |
+
<li class="flex justify-between">
|
585 |
+
<span>High</span>
|
586 |
+
<span class="font-medium">2,500 FLB</span>
|
587 |
+
</li>
|
588 |
+
<li class="flex justify-between">
|
589 |
+
<span>Medium</span>
|
590 |
+
<span class="font-medium">1,000 FLB</span>
|
591 |
+
</li>
|
592 |
+
</ol>
|
593 |
+
</div>
|
594 |
+
<div class="bg-gradient-to-br from-green-50 to-emerald-50 p-4 rounded-lg">
|
595 |
+
<h3 class="font-semibold text-gray-800 mb-2">Network Stats</h3>
|
596 |
+
<ul class="space-y-2 text-sm">
|
597 |
+
<li class="flex justify-between">
|
598 |
+
<span>Total Tests</span>
|
599 |
+
<span class="font-medium">1,842</span>
|
600 |
+
</li>
|
601 |
+
<li class="flex justify-between">
|
602 |
+
<span>Contracts Deployed</span>
|
603 |
+
<span class="font-medium">317</span>
|
604 |
+
</li>
|
605 |
+
<li class="flex justify-between">
|
606 |
+
<span>Unique Users</span>
|
607 |
+
<span class="font-medium">189</span>
|
608 |
+
</li>
|
609 |
+
</ul>
|
610 |
+
</div>
|
611 |
+
</div>
|
612 |
+
</section>
|
613 |
+
|
614 |
<!-- Manual QA Section -->
|
615 |
<section class="bg-white rounded-xl shadow-md p-6 mb-12">
|
616 |
<h2 class="text-2xl font-bold text-gray-800 mb-6 flex items-center">
|
|
|
711 |
</div>
|
712 |
</div>
|
713 |
<div class="border-t border-white border-opacity-20 mt-6 pt-6 text-sm text-center md:text-left">
|
714 |
+
<div class="flex flex-col md:flex-row justify-between">
|
715 |
+
<div class="mb-4 md:mb-0">
|
716 |
+
<p>© 2023 FlameBorn Project. All rights reserved.</p>
|
717 |
+
<p class="text-xs opacity-70 mt-1">Testnet tokens have no monetary value</p>
|
718 |
+
</div>
|
719 |
+
<div class="flex flex-wrap gap-x-4 gap-y-2 justify-center md:justify-end">
|
720 |
+
<a href="#" class="hover:underline">Terms</a>
|
721 |
+
<a href="#" class="hover:underline">Privacy</a>
|
722 |
+
<a href="#" class="hover:underline">Bug Bounty</a>
|
723 |
+
<a href="#" class="hover:underline">Documentation</a>
|
724 |
+
<a href="#" class="hover:underline">Audit Reports</a>
|
725 |
+
</div>
|
726 |
+
</div>
|
727 |
</div>
|
728 |
</div>
|
729 |
</footer>
|
730 |
|
731 |
<script>
|
732 |
+
// Wallet connection
|
733 |
+
document.getElementById('connectWallet').addEventListener('click', async () => {
|
734 |
+
if (window.ethereum) {
|
735 |
+
try {
|
736 |
+
const accounts = await ethereum.request({ method: 'eth_requestAccounts' });
|
737 |
+
console.log('Connected:', accounts[0]);
|
738 |
+
document.getElementById('connectWallet').innerHTML =
|
739 |
+
`<i class="fas fa-check-circle mr-1"></i> ${accounts[0].slice(0, 6)}...${accounts[0].slice(-4)}`;
|
740 |
+
document.getElementById('faucetAddress').value = accounts[0];
|
741 |
+
} catch (error) {
|
742 |
+
console.error('User rejected request:', error);
|
743 |
+
}
|
744 |
+
} else {
|
745 |
+
alert('Please install MetaMask!');
|
746 |
+
}
|
747 |
+
});
|
748 |
+
|
749 |
+
// Faucet request
|
750 |
+
document.getElementById('requestFaucet').addEventListener('click', () => {
|
751 |
+
const address = document.getElementById('faucetAddress').value;
|
752 |
+
if (!address) {
|
753 |
+
alert('Please enter a wallet address');
|
754 |
+
return;
|
755 |
+
}
|
756 |
+
if (!/^0x[a-fA-F0-9]{40}$/.test(address)) {
|
757 |
+
alert('Invalid Ethereum address');
|
758 |
+
return;
|
759 |
+
}
|
760 |
+
alert(`1000 FLB requested for ${address}. This is a simulation - on a real testnet, tokens would be sent.`);
|
761 |
+
});
|
762 |
+
|
763 |
+
// Simulate network status updates
|
764 |
+
function updateNetworkStatus() {
|
765 |
+
document.getElementById('currentBlock').textContent =
|
766 |
+
Math.floor(Math.random() * 1000000).toLocaleString();
|
767 |
+
document.getElementById('gasPrice').textContent =
|
768 |
+
`${(Math.random() * 50).toFixed(2)} Gwei`;
|
769 |
+
}
|
770 |
+
setInterval(updateNetworkStatus, 5000);
|
771 |
+
updateNetworkStatus();
|
772 |
+
|
773 |
// Simulate progress bar animation
|
774 |
document.addEventListener('DOMContentLoaded', function() {
|
775 |
const progressBar = document.querySelector('.progress-bar');
|