// Front page: the ticker, today's numbers, "Top ads this week" by verified clicks, the live ledger and the contract box. (async function () { VAB.renderNav('/'); VAB.renderFooter(); const $ = VAB.$, esc = VAB.esc; const d = await VAB.wire('front').catch(() => ({})); const t = d.today || {}; $('stViews').textContent = VAB.n(t.views); $('stClicks').textContent = VAB.n(t.vclicks); $('stBoosts').textContent = VAB.n(t.boosts); $('stAds').textContent = VAB.n(t.ads); const items = (d.board && d.board.items) || []; $('boardCards').innerHTML = items.length ? items.map(x => VAB.paper(x, 'No. ' + x.rank + ' · ' + VAB.n(x.clicks) + ' verified click' + (x.clicks === 1 ? '' : 's'), 'board')).join('') : '
No verified clicks yet this week. The first ad clicked by a verified visitor takes No. 1.
'; // the ledger: the newest Boost rows and their payouts const L = await VAB.getJSON('/api/ledger?n=6').catch(() => ({})); const ex = L.explorer || 'https://polygonscan.com'; const who = (a, nm) => nm ? '@' + esc(nm) : esc(VAB.short(a || '')); const rows = []; for (const r of (L.items || [])) { const link = 'verify'; rows.push('