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:
martbost
2026-11-13 10:35:08 -06:00
parent c6ca40a241
commit 87354e29b6
14 changed files with 259 additions and 15 deletions
+23
View File
@@ -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('');
})();