// 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) : '' + esc(short(addr)) + ''; const usd = (wei, rate) => rate ? ' ($' + (Number(BigInt(wei) / 10n ** 12n) / 1e6 * rate).toFixed(2) + ')' : ''; 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 => '
No earlier spots or sponsor to pay yet.
') + 'Company + momentum fund: ' + fmtPol(it.houseWei) + ' POL' + usd(it.houseWei, it.usd) + ' · Verify on Polygonscan
No spot sales yet.
'; $('upd').textContent = 'Updated ' + new Date().toLocaleTimeString(); } await load(); setInterval(load, 20000); })();