Payment proof + transparency (Marty 2026-11-13): every spot sale posts ONE message to the group's payments topic (tgproof.js: buyer, each member paid with POL and $ at the contract's price, company + fund line, Polygonscan verify + live ledger links; once across app copies via docstore.claim; never older than 2 h). New /ledger (every sale and payout, live, verify links) and /contract (verified source, owner, keeper, fee wallets, price feed, live reads, fixed split, how to check). Live sale toasts bottom-left on every page (real ledger rows only, newest 30 min). Nav + footer links. common.js?v=3, line.css?v=5. Smoke 76/76.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+27
-2
@@ -17,7 +17,7 @@ window.BL = (function () {
|
||||
async function renderNav(active) {
|
||||
const c = await getConfig().catch(() => ({}));
|
||||
const n = document.createElement('nav');
|
||||
const links = [['/', 'Home'], ['/board', 'Board'], ['/how', 'How it works'], ['/join', 'Get a spot'], ['/my', 'My Spots']];
|
||||
const links = [['/', 'Home'], ['/board', 'Board'], ['/how', 'How it works'], ['/ledger', 'Ledger'], ['/join', 'Get a spot'], ['/my', 'My Spots']];
|
||||
n.innerHTML = '<div class="wrap"><a class="brand" href="/"><img src="/art/mark.svg" alt="" width="38" height="38"><span class="logo-wrap"><span class="logo">Downline <b>Banners</b></span>'
|
||||
+ '<span class="byline">Part of the <b>Crypto Team Build</b> Network</span></span></a><div class="links">'
|
||||
+ links.map(l => '<a href="' + l[0] + '"' + (l[0] === active ? ' class="active"' : '') + '>' + l[1] + '</a>').join('') + '</div></div>';
|
||||
@@ -35,8 +35,9 @@ window.BL = (function () {
|
||||
f.className = 'bl-foot';
|
||||
f.innerHTML = '<div class="wrap"><p>Part of the Crypto Team Build Network</p>'
|
||||
+ '<p class="muted small">A spot buys 300 guaranteed views on the board and a place in the line. Nothing is promised: you are paid only when spots sell after yours, and a spot can earn back less than it cost.</p>'
|
||||
+ '<p class="small"><a href="/how">How it works</a> · <a href="/board">Board</a> · <a href="/my">My Spots</a></p></div>';
|
||||
+ '<p class="small"><a href="/how">How it works</a> · <a href="/board">Board</a> · <a href="/ledger">Live ledger</a> · <a href="/contract">Contract proof</a> · <a href="/my">My Spots</a></p></div>';
|
||||
document.body.appendChild(f);
|
||||
toasts();
|
||||
}
|
||||
// one spot tile; href goes through the /go relay, which counts the click
|
||||
function tile(t, opts) {
|
||||
@@ -50,6 +51,30 @@ window.BL = (function () {
|
||||
if (opts && opts.meta) { const m = document.createElement('span'); m.className = 'lot-meta'; m.textContent = t.t === 'spot' ? '#' + t.id : 'network'; a.appendChild(m); }
|
||||
return a;
|
||||
}
|
||||
// live sale toasts (Marty 2026-11-13): real sales from the ledger only, bottom-left, one at a time, never older than 30 minutes
|
||||
let toastsOn = false;
|
||||
async function toasts() {
|
||||
if (toastsOn) return; toastsOn = true;
|
||||
const seen = new Set(); let first = true;
|
||||
const box = document.createElement('div'); box.className = 'bl-toasts'; box.setAttribute('aria-live', 'polite'); document.body.appendChild(box);
|
||||
const show = it => {
|
||||
const top = it.pays.filter(p => !p.failed).sort((a, b) => (BigInt(b.wei) > BigInt(a.wei) ? 1 : -1))[0];
|
||||
const name = it.ownerName ? '@' + esc(it.ownerName) : 'A member';
|
||||
const el = document.createElement('a'); el.className = 'bl-toast'; el.href = '/ledger';
|
||||
el.innerHTML = '<b>' + name + '</b> took spot #' + it.spotId
|
||||
+ (top ? '<br><span>' + (it.pays.length > 1 ? it.pays.length + ' members paid, ' : '') + (top.name ? '@' + esc(top.name) : 'a member') + ' got ' + fmtPol(top.wei, 2) + ' POL</span>' : '<br><span>paid on-chain, $5</span>');
|
||||
box.appendChild(el); requestAnimationFrame(() => el.classList.add('in'));
|
||||
setTimeout(() => { el.classList.remove('in'); setTimeout(() => el.remove(), 400); }, 7000);
|
||||
};
|
||||
const tick = async () => {
|
||||
let d; try { d = await getJSON('/api/ledger?n=5'); } catch (e) { return; } if (!d || !d.items) return;
|
||||
const fresh = d.items.filter(it => !seen.has(it.tx) && (!it.at || Date.now() - it.at < 30 * 60000));
|
||||
d.items.forEach(it => seen.add(it.tx));
|
||||
const list = first ? fresh.slice(0, 1) : fresh.reverse(); first = false;
|
||||
list.forEach((it, i) => setTimeout(() => show(it), 1500 + i * 8000));
|
||||
};
|
||||
tick(); setInterval(tick, 25000);
|
||||
}
|
||||
function withRef(href, sponsor) { if (!sponsor) return href; return href + (href.includes('?') ? '&' : '?') + 'ref=' + encodeURIComponent(sponsor); }
|
||||
return { $, esc, getConfig, fmtPol, short, framed, status, getJSON, post, renderNav, renderFooter, tile, withRef };
|
||||
})();
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// Contract proof (Marty 2026-11-13): /api/contract answers straight from the live contract.
|
||||
(async () => {
|
||||
BL.renderNav('/contract'); BL.renderFooter();
|
||||
const { $, esc, fmtPol } = BL;
|
||||
const d = await BL.getJSON('/api/contract');
|
||||
if (d.error) { $('facts').innerHTML = '<p class="note err">' + esc(d.error) + '</p>'; return; }
|
||||
const ex = d.explorer;
|
||||
const addr = (a, label) => a ? '<a class="mono" target="_blank" rel="noopener" href="' + esc(ex + '/address/' + a) + '">' + esc(a) + '</a>' + (label ? ' <span class="muted small">' + esc(label) + '</span>' : '') : '-';
|
||||
const rows = [
|
||||
['Contract', addr(d.address) + ' <span class="badge-ok">Verified source</span> <a class="small" target="_blank" rel="noopener" href="' + esc(ex + '/address/' + d.address + '#code') + '">read the code</a>'],
|
||||
['Network', esc(d.chain) + ' (chain ' + esc(d.chainId) + ')'],
|
||||
['Deployed', '<a class="mono" target="_blank" rel="noopener" href="' + esc(ex + '/tx/' + d.deployTx) + '">' + esc(d.deployTx.slice(0, 18)) + '...</a>' + (d.deployBlock ? ' block ' + esc(d.deployBlock) : '')],
|
||||
['Owner', addr(d.owner, 'can pause new sales and change the keeper; cannot move funds or change the split')],
|
||||
['Keeper', addr(d.keeper, 'the only wallet allowed to make momentum-fund buys')],
|
||||
['Company A', addr(d.feeA)], ['Company B', addr(d.feeB)],
|
||||
['Price feed', addr(d.priceFeed, 'Chainlink POL/USD')],
|
||||
['Spot price now', d.quoteWei ? fmtPol(d.quoteWei) + ' POL ($5)' : '-'],
|
||||
['Spots sold', esc(d.spotCount || '0')],
|
||||
['Momentum fund', d.fundBalance ? fmtPol(d.fundBalance) + ' POL' : '-'],
|
||||
['Sales', d.paused === 'true' ? 'paused' : 'open']];
|
||||
$('facts').innerHTML = '<table class="tbl">' + rows.map(r => '<tr><th style="width:160px">' + r[0] + '</th><td style="word-break:break-all">' + r[1] + '</td></tr>').join('') + '</table>';
|
||||
$('split').innerHTML = '<tr><th>Share</th><th>To</th></tr>' + d.split.map(s => '<tr><td>' + esc(s.share) + '</td><td>' + esc(s.to) + '</td></tr>').join('');
|
||||
})();
|
||||
@@ -0,0 +1,26 @@
|
||||
// Live ledger (Marty 2026-11-13): /api/ledger, refreshed every 20 s. One row per spot sale: buyer, every member paid, company + fund.
|
||||
(async () => {
|
||||
BL.renderNav('/ledger'); BL.renderFooter();
|
||||
const { $, esc, fmtPol, short } = BL;
|
||||
const who = (name, addr) => name ? '@' + esc(name) : '<span class="mono">' + esc(short(addr)) + '</span>';
|
||||
const usd = (wei, rate) => rate ? ' <span class="muted">($' + (Number(BigInt(wei) / 10n ** 12n) / 1e6 * rate).toFixed(2) + ')</span>' : '';
|
||||
const KIND = { 0: 'bought by', 1: 'bought for', 2: 'gifted by the momentum fund to', 3: 'kept by the momentum fund' };
|
||||
async function load() {
|
||||
const d = await BL.getJSON('/api/ledger?n=100'); if (d.error) return;
|
||||
const t = d.totals || {};
|
||||
$('totals').innerHTML = [['Spots sold', t.spots || 0], ['Members', t.members || 0], ['POL paid out', fmtPol(t.paidOutWei || '0', 2)], ['Momentum fund', t.fundWei ? fmtPol(t.fundWei, 2) + ' POL' : '-']]
|
||||
.map(x => '<div class="stat"><b>' + esc(x[1]) + '</b><span>' + esc(x[0]) + '</span></div>').join('');
|
||||
$('rows').innerHTML = d.items.length ? d.items.map(it => {
|
||||
const when = it.at ? new Date(it.at).toLocaleString() : '';
|
||||
const pays = it.pays.map(p => '<li>' + (p.failed ? 'Bounced (to the fund): ' : '') + (p.role === 'sponsor' ? 'Sponsor' : 'Line ' + p.level + ' (spot #' + (it.spotId - p.level) + ')')
|
||||
+ ': <b>' + fmtPol(p.wei) + ' POL</b>' + usd(p.wei, it.usd) + ' to ' + who(p.name, p.to) + '</li>').join('');
|
||||
return '<div class="ledger-row"><div class="row" style="justify-content:space-between"><div><b>Spot #' + it.spotId + '</b> ' + esc(KIND[it.kind] || '') + ' ' + who(it.ownerName, it.owner)
|
||||
+ ' <span class="muted">$5 = ' + fmtPol(it.valueWei) + ' POL</span></div><span class="muted small">' + esc(when) + '</span></div>'
|
||||
+ (pays ? '<ul class="pays">' + pays + '</ul>' : '<p class="muted small">No earlier spots or sponsor to pay yet.</p>')
|
||||
+ '<p class="small muted">Company + momentum fund: ' + fmtPol(it.houseWei) + ' POL' + usd(it.houseWei, it.usd)
|
||||
+ ' · <a target="_blank" rel="noopener" href="' + esc(d.explorer + '/tx/' + it.tx) + '">Verify on Polygonscan</a></p></div>';
|
||||
}).join('') : '<p class="muted">No spot sales yet.</p>';
|
||||
$('upd').textContent = 'Updated ' + new Date().toLocaleTimeString();
|
||||
}
|
||||
await load(); setInterval(load, 20000);
|
||||
})();
|
||||
@@ -49,3 +49,14 @@ nav .links a.active{color:var(--mint-ink);background:var(--mint)}
|
||||
.brand img{flex:none;filter:drop-shadow(0 4px 14px rgba(155,123,255,.35))}
|
||||
.brand .logo{letter-spacing:-.02em}
|
||||
.ls-pick{margin:6px 0 4px}.ls-pick .row{gap:8px}
|
||||
.ledger-row{border-top:1px solid var(--line);padding:12px 0}
|
||||
.ledger-row:first-child{border-top:0}
|
||||
.ledger-row .pays{margin:6px 0 4px;padding-left:18px;font-size:14px}
|
||||
.badge-ok{display:inline-block;font-size:11.5px;font-weight:700;padding:2px 8px;border-radius:999px;background:var(--mint-soft);color:var(--mint);border:1px solid var(--mint-line);margin-left:6px}
|
||||
.bl-toasts{position:fixed;left:max(16px,env(safe-area-inset-left,0px));bottom:max(16px,env(safe-area-inset-bottom,0px));z-index:50;display:flex;flex-direction:column;gap:8px;pointer-events:none}
|
||||
.bl-toast{pointer-events:auto;display:block;max-width:300px;background:var(--panel-solid);border:1px solid var(--mint-line);border-radius:14px;padding:10px 14px;color:var(--ink);font-size:13.5px;line-height:1.35;
|
||||
box-shadow:0 12px 30px -12px rgba(0,0,0,.8);opacity:0;transform:translateY(10px);transition:opacity .35s ease,transform .35s ease;text-decoration:none!important}
|
||||
.bl-toast.in{opacity:1;transform:none}
|
||||
.bl-toast span{color:var(--muted);font-size:12.5px}
|
||||
@media (prefers-reduced-motion:reduce){.bl-toast{transition:none}}
|
||||
@media (max-width:520px){.bl-toast{max-width:calc(100vw - 32px)}}
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/logo-icon.png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=2">
|
||||
<link rel="stylesheet" href="/assets/line.css?v=4">
|
||||
<link rel="stylesheet" href="/assets/line.css?v=5">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class="card"><h3>The line so far</h3><div id="stats" class="grid2"></div></div>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=2"></script>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/board.js?v=1"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Contract proof | Downline Banners</title>
|
||||
<meta name="description" content="The Downline Banners smart contract on Polygon: address, verified source, owner, fee wallets and the fixed split, read live.">
|
||||
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/logo-icon.png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=2">
|
||||
<link rel="stylesheet" href="/assets/line.css?v=5">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
<section class="hero"><h1>Contract proof</h1><p class="lead">Downline Banners runs on one smart contract on Polygon. Its source code is verified on Polygonscan, the split is fixed in the code, and every number below is read live from the contract. <a href="/ledger">Live ledger</a></p></section>
|
||||
<div class="card" id="facts"><p class="muted">Reading the contract...</p></div>
|
||||
<div class="card"><h3>Where each $5 goes, in the same transaction</h3><table class="tbl" id="split"></table>
|
||||
<p class="muted small">The contract holds nothing except the momentum fund, which can only buy spots. The split cannot be changed and there is no owner withdraw.</p></div>
|
||||
<div class="card"><h3>Check it yourself</h3><ol class="small">
|
||||
<li>Open the contract on Polygonscan (link above) and choose the <b>Contract</b> tab: the source code shows a green check for "verified".</li>
|
||||
<li>Under <b>Read Contract</b>, compare owner, keeper, fee wallets and fund balance with this page.</li>
|
||||
<li>Open any sale in the <a href="/ledger">live ledger</a> and look at its <b>Logs</b>: one SpotBought event, then one Paid event per payment.</li></ol></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/contract.js?v=1"></script>
|
||||
</body>
|
||||
</html>
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/logo-icon.png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=2">
|
||||
<link rel="stylesheet" href="/assets/line.css?v=4">
|
||||
<link rel="stylesheet" href="/assets/line.css?v=5">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
@@ -24,7 +24,7 @@
|
||||
<div class="card"><h3>The momentum fund</h3><p>When no spot has sold for 4 hours, the fund buys one (at most 12 a day). It gifts the spot to an active member who owns a paid spot and has not had a gift in 7 days, members who referred someone recently first. If nobody qualifies, the fund keeps the spot and its line money goes back into the fund.</p></div>
|
||||
<div class="card"><h3>The rest of the network</h3><p>Open board slots show network sites such as InstantAdPay and LinkSpin. On InstantAdPay, ad credits buy advertising, not income.</p></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=2"></script>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/how.js?v=1"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/logo-icon.png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=2">
|
||||
<link rel="stylesheet" href="/assets/line.css?v=4">
|
||||
<link rel="stylesheet" href="/assets/line.css?v=5">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
@@ -37,7 +37,7 @@
|
||||
</section>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=2"></script>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/gate.js?v=1"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/logo-icon.png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=2">
|
||||
<link rel="stylesheet" href="/assets/line.css?v=4">
|
||||
<link rel="stylesheet" href="/assets/line.css?v=5">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
@@ -34,7 +34,7 @@
|
||||
<div id="status" class="note" hidden></div>
|
||||
<div class="card" id="doneCard" hidden><h3>Your spot is in the line</h3><p>Next: add your image and link in My Spots. One free signature signs you in (it cannot move funds).</p><div class="row"><button class="btn" id="toMyBtn">Open My Spots</button></div><p class="small mono" id="txLink"></p></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=2"></script>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/wallet.js?v=1"></script>
|
||||
<script src="/assets/join.js?v=2&o=1"></script>
|
||||
</body>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Live ledger | Downline Banners</title>
|
||||
<meta name="description" content="Every Downline Banners spot sale and every payment the contract made, live from the Polygon blockchain.">
|
||||
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/logo-icon.png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=2">
|
||||
<link rel="stylesheet" href="/assets/line.css?v=5">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
<section class="hero"><h1>Live ledger</h1><p class="lead">Every spot sale and every payment, read from the Polygon blockchain. Each row links to the transaction so you can check it yourself. <a href="/contract">Contract proof</a></p></section>
|
||||
<div class="grid2" id="totals"></div>
|
||||
<div class="card"><div class="row" style="justify-content:space-between"><h3 style="margin:0">Spot sales</h3><span class="muted small" id="upd"></span></div>
|
||||
<div id="rows"><p class="muted">Loading the ledger...</p></div></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/ledger.js?v=1"></script>
|
||||
</body>
|
||||
</html>
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/logo-icon.png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=2">
|
||||
<link rel="stylesheet" href="/assets/line.css?v=4">
|
||||
<link rel="stylesheet" href="/assets/line.css?v=5">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
@@ -26,7 +26,7 @@
|
||||
</div>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=2"></script>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/wallet.js?v=1"></script>
|
||||
<script src="/assets/my.js?v=5"></script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user