VBB purchases live + weekly prize payouts (Marty 2026-11-14: "why does it say 'coming soon' on all the stuff in it? Shouldn't it all be live already?")
Buying (VBBShop 0x36F6...07D7): Packages page has live Buy buttons for the 10 and 40 credit packs (USD price + live POL from quoteWei, SafePal or any other crypto wallet, one-time, never a subscription, where the payment goes); My Banners has "Add the banner look ($2)" on each waiting or in-loop banner (SKU 3, ref = banner id) and a 40-character teaser editor once it has the look. POST /api/my/order builds the member's buy() call on the server (fresh keeper voucher when the hub knows their sponsor, else no sponsor); the page checks the connected wallet is the member's VBB account (explains how to switch if not), checks the balance, sends with Polygon's fee floor (/api/gas), waits on /api/tx, nudges the watcher (/api/my/paid) and polls until the credits or the look arrive. Public: /api/quote, /api/gas, /api/tx/<hash>; /api/config has shop {live, contract} + explorer. The banner look on the loop: double border + star, hover teaser (always shown on touch screens; default = the link's site). Only Tokens still says coming soon. wallet.js gains sendTx/waitTx/balance (DLB flow).
Weekly prize payouts (prize.js): each Central-time week's pot = 10% of its VBBShop sales (usdCents of Purchase events by block time), $20 floor (company top-up shown to admin), $50 cap internal, half per board, 50/30/20. Every Monday the app prepares last week's plan (winners, wallets, USD; POL quoted live from the Chainlink feed the contract uses). /admin "Approve and pay" (two clicks): refuses unless PRIZE_KEY is the contract's prizeWallet(), the feed is fresh and the wallet holds the POL + gas (says how much more to send); then once per week (docstore.claim in MySQL + plan status), consecutive nonces, each hash saved as sent, stops at the first unclear send (never auto-retried), receipts watched. Ties: earlier to reach the count wins (leaderboards use the same rule). A winner that cannot be paid (the prize or company wallet) is skipped and the rest move up; an unfilled place stays in the prize wallet. /leaders shows past winners with transaction links. Posts nothing anywhere. Compose passes PRIZE_KEY.
Tests: smoke 192/192 (stand-in chain answers quoteWei + receipts: quote, order calldata + voucher, look purchase, teaser, prizes API, UI Buy buttons). New qa/chain.mjs on a local anvil with the real VBBShop + mock feed: buy -> Purchase -> credits, voucher binds sponsor, 30/10/60 split, overpay refunded, banner look; prize prepare -> short refusal -> pay 6 transfers exact POL -> paid once: 29/29. common.js?v=3, vbb.css?v=4.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -158,3 +158,17 @@ footer.foot a{color:var(--amber)} footer.foot p{margin:6px 0}
|
||||
/* network zones (2026-11-14): neutral class names, centered, small label */
|
||||
.net-zone{display:flex;flex-direction:column;align-items:center;gap:4px;margin:18px auto;max-width:100%;overflow:hidden}
|
||||
.net-zone-label{font:700 10.5px var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--faint)}
|
||||
/* banner look (SKU 3, 2026-11-14): a bright double border + a teaser line on hover (always shown on touch screens) */
|
||||
.tile.look{border:3px solid var(--hot);box-shadow:0 0 0 3px var(--amber),5px 5px 0 3px var(--ink);animation:lookglow 2.4s ease-in-out infinite}
|
||||
@keyframes lookglow{50%{box-shadow:0 0 0 3px var(--sky),5px 5px 0 3px var(--ink)}}
|
||||
.tile.look::after{content:"\2605";position:absolute;right:4px;top:3px;font:700 13px/1 var(--body);color:var(--amber);-webkit-text-stroke:1px var(--ink)}
|
||||
.tile .teaser{position:absolute;left:0;right:0;bottom:0;padding:6px 6px 7px;background:var(--hot);color:#fff;font:700 11px/1.25 var(--body);text-align:center;transform:translateY(100%);transition:transform .18s ease;white-space:normal;overflow:hidden;max-height:60%}
|
||||
.tile.look:hover .teaser,.tile.look:focus-visible .teaser{transform:none}
|
||||
.tile.look:hover .who,.tile.look:focus-visible .who{opacity:0}
|
||||
@media (hover:none){.tile.look .teaser{transform:none;font-size:9.5px;padding:3px 4px}}
|
||||
.pk-usd{margin:2px 0 8px}.pk-usd b{font:800 22px/1.1 var(--disp)}
|
||||
.pk-intro{text-align:center}
|
||||
.mine .item .look-row{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin-top:6px}
|
||||
.mine .item .look-row input{flex:1;min-width:120px;background:var(--panel);border:2px solid var(--ink);border-radius:8px;padding:6px 8px;font:13px var(--body)}
|
||||
.pill.look{background:var(--hot);color:#fff}
|
||||
.past{display:grid;gap:12px}.past .wk{background:var(--bg2);border:var(--edge);border-radius:14px;padding:12px 14px}
|
||||
|
||||
Reference in New Issue
Block a user