From 3b377ea8570467a4f2456d40d5529b954ab180ff Mon Sep 17 00:00:00 2001 From: Kurdistan Tech Ministry Date: Thu, 20 Nov 2025 07:05:48 +0300 Subject: [PATCH] feat: add PEZ presale system with wUSDT contribution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implemented complete presale system for PEZ token distribution: Backend (Pallet): - Created pallet-presale at /home/mamostehp/Pezkuwi-SDK/pezkuwi/pallets/presale/ - Accepts wUSDT (Asset ID 2) contributions - Tracks all contributors and amounts - Distributes PEZ (Asset ID 1) after 45-day period - Conversion rate: 1 wUSDT = 100 PEZ - Includes emergency pause/unpause functionality - Runtime integration documentation provided Frontend: - Created Presale page with contribution form - Live stats: time remaining, total raised, contributors count - Real-time balance display and conversion calculator - Progress bar showing fundraising goal ($1M target) - Added route /presale and navigation under Trading menu - Connected to PolkadotContext and WalletContext Technical Details: - wUSDT: 6 decimals (Asset ID 2) - PEZ: 12 decimals (Asset ID 1) - Duration: 648,000 blocks (45 days @ 6s blocks) - Treasury: PalletId "py/prsal" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- web/src/App.tsx | 2 + web/src/components/AppLayout.tsx | 9 +- web/src/pages/Presale.tsx | 372 +++++++++++++++++++++++++++++++ 3 files changed, 382 insertions(+), 1 deletion(-) create mode 100644 web/src/pages/Presale.tsx diff --git a/web/src/App.tsx b/web/src/App.tsx index 520737d7..29e64dd7 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -37,6 +37,7 @@ const Elections = lazy(() => import('./pages/Elections')); const EducationPlatform = lazy(() => import('./pages/EducationPlatform')); const P2PPlatform = lazy(() => import('./pages/P2PPlatform')); const DEXDashboard = lazy(() => import('./components/dex/DEXDashboard').then(m => ({ default: m.DEXDashboard }))); +const Presale = lazy(() => import('./pages/Presale')); const NotFound = lazy(() => import('@/pages/NotFound')); // Loading component @@ -137,6 +138,7 @@ function App() { } /> + } /> } /> diff --git a/web/src/components/AppLayout.tsx b/web/src/components/AppLayout.tsx index 13cc03bb..2c29f816 100644 --- a/web/src/components/AppLayout.tsx +++ b/web/src/components/AppLayout.tsx @@ -19,7 +19,7 @@ import { TreasuryOverview } from './treasury/TreasuryOverview'; import { FundingProposal } from './treasury/FundingProposal'; import { SpendingHistory } from './treasury/SpendingHistory'; import { MultiSigApproval } from './treasury/MultiSigApproval'; -import { ExternalLink, Award, FileEdit, Users2, MessageSquare, ShieldCheck, Wifi, WifiOff, Wallet, DollarSign, PiggyBank, History, Key, TrendingUp, ArrowRightLeft, Lock, LogIn, LayoutDashboard, Settings, Users, Droplet, Mail } from 'lucide-react'; +import { ExternalLink, Award, FileEdit, Users2, MessageSquare, ShieldCheck, Wifi, WifiOff, Wallet, DollarSign, PiggyBank, History, Key, TrendingUp, ArrowRightLeft, Lock, LogIn, LayoutDashboard, Settings, Users, Droplet, Mail, Coins } from 'lucide-react'; import GovernanceInterface from './GovernanceInterface'; import RewardDistribution from './RewardDistribution'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; @@ -192,6 +192,13 @@ const AppLayout: React.FC = () => { P2P + + +
+

+ + Pre-Sale Terms +

+
+
+ Conversion Rate: + 1 wUSDT = 100 PEZ +
+
+ Distribution: + After 45 days +
+
+ Lock Period: + None +
+
+
+ + {parseFloat(balances.USDT) === 0 && ( + + + + You don't have wUSDT. Please bridge USDT to wUSDT first. + + + )} + + )} + + + {/* Info Cards */} +
+ +

How to Participate

+
    +
  1. Connect your PezkuwiChain wallet
  2. +
  3. Ensure you have wUSDT (bridge if needed)
  4. +
  5. Enter the amount you want to contribute
  6. +
  7. Confirm the transaction
  8. +
  9. Receive PEZ after 45 days
  10. +
+
+ + +

Important Notes

+
    +
  • Minimum contribution: 1 wUSDT
  • +
  • PEZ will be distributed automatically after presale ends
  • +
  • Contributions are final and non-refundable
  • +
  • Pre-sale duration: 45 days
  • +
+
+
+ + + ); +}