You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
199 lines
8.2 KiB
199 lines
8.2 KiB
|
3 months ago
|
<!DOCTYPE html>
|
||
|
|
<html lang="en">
|
||
|
|
<head>
|
||
|
|
<meta charset="UTF-8" />
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
|
|
<title>PoWH3d Lottery</title>
|
||
|
|
|
||
|
|
<!-- Favicons -->
|
||
|
|
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
||
|
|
<link rel="icon" type="image/svg+xml" href="favicon.svg" />
|
||
|
|
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32.png" />
|
||
|
|
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16.png" />
|
||
|
|
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png" />
|
||
|
|
<link rel="stylesheet" href="styles.css" />
|
||
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Press+Start+2P&display=swap" rel="stylesheet" />
|
||
|
|
<meta id="app-config" data-cluster="https://api.devnet.solana.com" data-program-id="" data-mint="" data-dev-wallet="" />
|
||
|
|
<script defer src="https://analytics.temple-os.com/script.js" data-website-id="3f1f899a-29c2-48cf-b7c6-6c4ab80f7d1a"></script>
|
||
|
|
<script src="https://unpkg.com/@solana/web3.js@1.95.3/lib/index.iife.min.js"></script>
|
||
|
|
<script type="module">
|
||
|
|
import {
|
||
|
|
registerMwa,
|
||
|
|
createDefaultAuthorizationCache,
|
||
|
|
createDefaultChainSelector,
|
||
|
|
createDefaultWalletNotFoundHandler
|
||
|
|
} from 'https://esm.sh/@solana-mobile/wallet-standard-mobile';
|
||
|
|
|
||
|
|
registerMwa({
|
||
|
|
appIdentity: {
|
||
|
|
name: 'PoWH3d Lottery',
|
||
|
|
uri: window.location.origin,
|
||
|
|
icon: 'apple-touch-icon.png'
|
||
|
|
},
|
||
|
|
authorizationCache: createDefaultAuthorizationCache(),
|
||
|
|
chains: ['solana:mainnet', 'solana:devnet'],
|
||
|
|
chainSelector: createDefaultChainSelector(),
|
||
|
|
onWalletNotFound: createDefaultWalletNotFoundHandler()
|
||
|
|
// remoteHostAuthority: 'wss://<reflector-endpoint>' // enable when you have a reflector server
|
||
|
|
});
|
||
|
|
</script>
|
||
|
|
<script src="app.js" defer></script>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<div class="animated-background">
|
||
|
|
<svg class="animated-wave" viewBox="0 0 100 100" preserveAspectRatio="none">
|
||
|
|
<path class="wave" d="M0,90 L20,85 L40,80 L60,85 L80,70 L100,75" />
|
||
|
|
<path class="wave wave2" d="M0,90 L20,85 L40,80 L60,85 L80,70 L100,75" />
|
||
|
|
<path class="wave wave3" d="M0,90 L20,85 L40,80 L60,85 L80,70 L100,75" />
|
||
|
|
</svg>
|
||
|
|
</div>
|
||
|
|
<div class="money-rain" id="moneyRain"></div>
|
||
|
|
<div class="ticker-wrap"><div class="ticker" id="ticker"></div></div>
|
||
|
|
<header class="hero">
|
||
|
|
<div class="wrap">
|
||
|
|
<h1>PoWH3d Lottery</h1>
|
||
|
|
<div class="hero-pot">
|
||
|
|
<div class="amount"><span id="potBig">0.000</span> SOL <span id="potDelta" class="delta"></span></div>
|
||
|
|
</div>
|
||
|
|
<p class="sub">8‑bit bonding‑curve lottery on Solana • ultra‑low fees • instant settlements</p>
|
||
|
|
</div>
|
||
|
|
</header>
|
||
|
|
|
||
|
|
<main class="wrap">
|
||
|
|
<section class="panel tabs">
|
||
|
|
<div class="tabs-nav">
|
||
|
|
<button class="tab active" data-tab="purchase">Purchase</button>
|
||
|
|
<button class="tab" data-tab="vault">Vault</button>
|
||
|
|
<button class="tab" data-tab="referrals">Share & Earn</button>
|
||
|
|
</div>
|
||
|
|
<div class="tab-content active" id="tab-purchase">
|
||
|
|
<div class="row">
|
||
|
|
<div class="col">
|
||
|
|
<h2>Connect</h2>
|
||
|
|
<div class="wallet-row">
|
||
|
|
<select id="walletSelect" class="input">
|
||
|
|
<option value="auto">Auto-detect</option>
|
||
|
|
</select>
|
||
|
|
<button id="connectBtn" class="btn">Connect Wallet</button>
|
||
|
|
<button id="disconnectBtn" class="btn alt danger" style="display:none;">Disconnect</button>
|
||
|
|
<span id="walletChip" class="chip" style="display:none;">Not connected</span>
|
||
|
|
</div>
|
||
|
|
<div id="iosNotice" class="muted" style="display:none; margin-top:8px;">
|
||
|
|
On iOS, connect by opening this site inside your wallet’s in‑app browser, or use a wallet with a Safari extension (e.g., Glow, Nightly).
|
||
|
|
</div>
|
||
|
|
<div class="grid2">
|
||
|
|
<label class="label">Wallet</label>
|
||
|
|
<input id="walletAddr" class="input" readonly />
|
||
|
|
<label class="label">Your Token Balance</label>
|
||
|
|
<input id="userBalance" class="input" readonly />
|
||
|
|
</div>
|
||
|
|
<!-- Hidden referrer field (populated from ?ref=) -->
|
||
|
|
<input id="referrer" type="text" style="display:none" />
|
||
|
|
<div id="reflinkRow" class="wallet-row" style="display:none;">
|
||
|
|
<input id="reflink" class="input" readonly />
|
||
|
|
<button id="copyRef" class="btn alt">Copy Reflink</button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="col">
|
||
|
|
<h2>Pot</h2>
|
||
|
|
<div class="grid2">
|
||
|
|
<label class="label">Current Pot</label>
|
||
|
|
<input id="potValue" class="input" readonly />
|
||
|
|
<label class="label">Status</label>
|
||
|
|
<input id="statusValue" class="input" value="Connect wallet to participate" readonly />
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="panel" id="actionsPanel" style="display:none;">
|
||
|
|
<div class="row">
|
||
|
|
<div class="col">
|
||
|
|
<h2>Buy Tokens</h2>
|
||
|
|
<div class="grid2">
|
||
|
|
<label class="label">SOL amount</label>
|
||
|
|
<input id="buyAmount" class="input" type="number" step="0.001" value="0.1" />
|
||
|
|
</div>
|
||
|
|
<p class="muted">Buy tokens to earn dividends from future trades. Your account will be created automatically.</p>
|
||
|
|
<div class="wallet-row">
|
||
|
|
<button class="btn alt" id="buyBtn">Buy Tokens</button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="col">
|
||
|
|
<h2>Market Info</h2>
|
||
|
|
<div class="grid2">
|
||
|
|
<label class="label">Current Price</label>
|
||
|
|
<input id="currentPrice" class="input" readonly />
|
||
|
|
<label class="label">Total Supply</label>
|
||
|
|
<input id="totalSupply" class="input" readonly />
|
||
|
|
</div>
|
||
|
|
<p class="muted">Price increases as more tokens are minted. Early buyers get better prices.</p>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="row">
|
||
|
|
<div class="col">
|
||
|
|
<h2>Sell</h2>
|
||
|
|
<div class="grid2">
|
||
|
|
<label class="label">Tokens to sell (raw, 9dp)</label>
|
||
|
|
<input id="sellAmount" class="input" type="number" step="1" value="100000000" />
|
||
|
|
</div>
|
||
|
|
<button id="sellBtn" class="btn danger">Sell Tokens</button>
|
||
|
|
</div>
|
||
|
|
<div class="col">
|
||
|
|
<h2>Withdraw</h2>
|
||
|
|
<p class="muted">Claims accumulated dividends.</p>
|
||
|
|
<button id="withdrawBtn" class="btn">Withdraw Dividends</button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</section>
|
||
|
|
|
||
|
|
<section class="panel tab-content" id="tab-vault" style="display:none;">
|
||
|
|
<div class="row">
|
||
|
|
<div class="col">
|
||
|
|
<h2>Vault</h2>
|
||
|
|
<div class="grid2">
|
||
|
|
<label class="label">Total Gains</label>
|
||
|
|
<input id="userEarnings" class="input" readonly />
|
||
|
|
<label class="label">Your Keys</label>
|
||
|
|
<input id="userKeys" class="input" readonly />
|
||
|
|
</div>
|
||
|
|
<div class="wallet-row">
|
||
|
|
<button id="withdrawBtn2" class="btn">Withdraw</button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="col">
|
||
|
|
<h2>Round</h2>
|
||
|
|
<div class="grid2">
|
||
|
|
<label class="label">Active Pot</label>
|
||
|
|
<input id="potValue2" class="input" readonly />
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</section>
|
||
|
|
|
||
|
|
<section class="panel tab-content" id="tab-referrals" style="display:none;">
|
||
|
|
<h2>Share & Earn</h2>
|
||
|
|
<p class="muted">Share your link and earn referral bonuses when friends buy. Your link is personalized after connecting.</p>
|
||
|
|
<div class="wallet-row">
|
||
|
|
<input id="reflink2" class="input" readonly />
|
||
|
|
<button id="copyRef2" class="btn alt">Copy Link</button>
|
||
|
|
</div>
|
||
|
|
</section>
|
||
|
|
|
||
|
|
<section class="panel">
|
||
|
|
<h2>How it Works</h2>
|
||
|
|
<p class="muted">Buy with SOL to mint lottery tokens on a bonding curve. A small protocol fee and referral bonus are taken on each trade; the rest boosts the community pot and holder rewards. Sell anytime; proceeds are net of fees. As activity grows, holders earn more.</p>
|
||
|
|
</section>
|
||
|
|
|
||
|
|
|
||
|
|
</main>
|
||
|
|
|
||
|
|
<footer class="foot wrap">
|
||
|
|
<span>© PoWH3d Lottery · Built for Solana</span>
|
||
|
|
<a href="#" class="muted">Privacy</a>
|
||
|
|
</footer>
|
||
|
|
</body>
|
||
|
|
</html>
|