Trust pack (Marty 2026-11-14): contract proof, live ledger, proof toasts, Telegram sale cards, legal pages, network footer.
- proof.js: /api/ledger (each VBBShop purchase with its split read from the receipt's Paid/PaymentFailed events, else the contract's fixed 30/10/60 math; weekly prize transfers with their transactions), /api/contract (owner, prize wallet, company, keeper, paused, orders, balance and owed, read live and cached 5 min; Sourcify exact match, Polygonscan pending).
- Telegram (CTB Rewards bot, payments topic, TG_TOKEN/TG_CHAT/TG_PAY_TOPIC same as Downline Banners): one photo card per purchase (prebuilt VBB proof image rotated, buyer, sponsor/prize/company split in POL, this week's purchases + prize pot, Polygonscan + ledger links) and one line per confirmed prize payout. Hooks: shop.setHook (newly credited purchases only) and prize.setHook (confirmed transfers); once per tx via an in-process guard plus docstore.claim; nothing older than 2 hours.
- Pages /contract, /ledger, /terms, /disclaimer (Earnings Disclaimer), /privacy (TrustClickz, real mechanics: advertising not income, same-transaction split, prize wallet holds the 10% until Monday, no refunds on-chain, one-time purchases, crypto risk, data incl. hashed visit checks and the network hub); sitemap.
- Footer: Terms, Earnings Disclaimer, Privacy, Contract, Ledger, Support, company line, 'Part of the network' from the hub (netsites.js, /api/network-sites, fallback list), VBB marked current. Toasts add purchases and prize payouts.
- tools/proof-art.mjs renders public/art/proof/vbb-proof-{pink,blue,yellow}.png. common.js?v=5, vbb.css?v=6.
chain.mjs 49/49 (real contract on anvil + stand-in Telegram: exact split, 2 cards, no repost on rescans, 6 prize lines). smoke 241/241.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+40
@@ -0,0 +1,40 @@
|
||||
// The network sites list for the footer's "Part of the network" line (Marty 2026-11-14 trust pack).
|
||||
// One source: the hub's public GET /v1/network-sites (HUB_URL). Cached 10 minutes, refreshed in the background, never waits on a
|
||||
// slow hub (2.5 s timeout), and falls back to the same built-in list. Never RM Circle, never the games.
|
||||
// The same file lives in every network site (InstantAdPay, LinkSpin, Downline Banners, VBB, Stack POL).
|
||||
const FALLBACK = [
|
||||
{ id: 'iap', name: 'InstantAdPay', url: 'https://instantadpay.com' },
|
||||
{ id: 'linkspin', name: 'LinkSpin', url: 'https://linkspin.app' },
|
||||
{ id: 'dlb', name: 'Downline Banners', url: 'https://downlinebanners.com' },
|
||||
{ id: 'vbb', name: 'Viral Banner Blitz', url: 'https://viralbannerblitz.com' },
|
||||
{ id: 'stackpol', name: 'Stack POL', url: 'https://stackpol.com' },
|
||||
{ id: 'earnerscorner', name: 'Earners Corner', url: 'https://earnerscorner.com' }
|
||||
];
|
||||
const TTL = 10 * 60 * 1000;
|
||||
let cache = { at: 0, list: FALLBACK, from: 'fallback' };
|
||||
let inflight = null;
|
||||
|
||||
const hubUrl = () => String(process.env.HUB_URL || 'https://hub.saasy.top').trim().replace(/\/+$/, '');
|
||||
function clean(list) {
|
||||
if (!Array.isArray(list)) return null;
|
||||
const ok = list.filter(s => s && typeof s.name === 'string' && /^https:\/\/[a-z0-9.-]+(\/[^\s"'<>]*)?$/i.test(String(s.url || '')))
|
||||
.slice(0, 30).map(s => ({ id: String(s.id || s.name).toLowerCase().replace(/[^a-z0-9]+/g, '').slice(0, 30), name: String(s.name).slice(0, 60), url: String(s.url).replace(/\/+$/, '') }));
|
||||
return ok.length ? ok : null;
|
||||
}
|
||||
function refresh() {
|
||||
if (inflight || process.env.NETWORK_SITES_HUB === '0') return inflight;
|
||||
const ac = new AbortController(); const t = setTimeout(() => ac.abort(), 2500);
|
||||
inflight = fetch(hubUrl() + '/v1/network-sites', { signal: ac.signal })
|
||||
.then(r => (r.ok ? r.json() : null))
|
||||
.then(j => { const l = clean(j); if (l) cache = { at: Date.now(), list: l, from: 'hub' }; else cache.at = Date.now(); })
|
||||
.catch(() => { cache.at = Date.now() - TTL + 60 * 1000; }) // hub down: try again in a minute, keep the last good list
|
||||
.finally(() => { clearTimeout(t); inflight = null; });
|
||||
return inflight;
|
||||
}
|
||||
function list() { if (Date.now() - cache.at > TTL) refresh(); return cache.list; }
|
||||
// GET /api/network-sites: public, cacheable, the same answer on every page
|
||||
function handle(req, res) {
|
||||
res.writeHead(200, { 'Content-Type': 'application/json; charset=utf-8', 'Cache-Control': 'public, max-age=300', 'X-Content-Type-Options': 'nosniff' });
|
||||
res.end(JSON.stringify(list()));
|
||||
}
|
||||
module.exports = { list, handle, refresh, FALLBACK, _state: () => cache };
|
||||
@@ -28,6 +28,8 @@ const ADDR_RE = /^0x[0-9a-fA-F]{40}$/;
|
||||
const BOARDS = ['visitors', 'sources'];
|
||||
const COMPANY = '0x7627fc78876948ac9d95c1c9eb061e7d6d647b70';
|
||||
let C = null, key = null, D = null, busy = false, timer = null;
|
||||
let onConfirmed = null; // proof.js: one Telegram line per confirmed prize transfer (2026-11-14); this module still posts nothing itself
|
||||
function setHook(fn) { onConfirmed = typeof fn === 'function' ? fn : null; }
|
||||
const st = { prepared: 0, paid: 0, lastError: null };
|
||||
const FILE = () => path.join(C.dataDir, 'prizes.json');
|
||||
|
||||
@@ -166,7 +168,7 @@ function watchReceipts(week) {
|
||||
const plan = D.weeks[week]; if (!plan) { watching.delete(week); return; }
|
||||
for (const t of plan.transfers) {
|
||||
if (t.status !== 'sent' || !t.tx) continue;
|
||||
try { const r = await shop.receipt(t.tx); if (r.found) { t.status = r.status === '0x1' ? 'confirmed' : 'reverted'; t.block = parseInt(r.blockNumber, 16); save(); } } catch (e) {}
|
||||
try { const r = await shop.receipt(t.tx); if (r.found) { t.status = r.status === '0x1' ? 'confirmed' : 'reverted'; t.block = parseInt(r.blockNumber, 16); save(); if (t.status === 'confirmed' && onConfirmed) { try { onConfirmed(plan, t); } catch (e) {} } } } catch (e) {}
|
||||
}
|
||||
const open = plan.transfers.some(t => t.status === 'sent');
|
||||
if (!open && (plan.status === 'sent' || plan.status === 'paying')) { plan.status = plan.transfers.every(t => t.status === 'confirmed') ? 'paid' : 'partial'; plan.payment.doneAt = Date.now(); save(); }
|
||||
@@ -184,4 +186,4 @@ function history(n) {
|
||||
function plans() { return Object.values(D.weeks).sort((a, b) => b.week.localeCompare(a.week)); }
|
||||
function view() { return Object.assign({ keyOn: !!key, keyAddress: key ? key.address.toLowerCase() : null, prizeWallet: C.prizePot.wallet, weeks: Object.keys(D.weeks).length }, st); }
|
||||
|
||||
module.exports = { init, pot, prepare, pay, quotePlan, history, plans, view, prevWeek, auto };
|
||||
module.exports = { setHook, init, pot, prepare, pay, quotePlan, history, plans, view, prevWeek, auto };
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
// Trust pack (Marty 2026-11-14: "all these sites need to show their live ledger and the contract for proof and trust, and toast
|
||||
// notifications ... post a Telegram with some kind of image and stats, and payment notifications"). The Downline Banners pattern.
|
||||
// - ledger(): every VBBShop purchase (from the Purchase events shop.js credited) with its split, and every weekly prize transfer,
|
||||
// newest first, each with its transaction. Public, read by /ledger and the toasts.
|
||||
// - contract(): the live contract facts for /contract (owner, prize wallet, company, keeper, paused, what it holds), read from the
|
||||
// chain and cached 5 minutes; the split constants are the contract's own (30 / 10 / 60).
|
||||
// - Telegram: one photo card per purchase (a prebuilt VBB proof image, rotated, + who bought what, the split paid in that same
|
||||
// transaction, this week's numbers and the verify link) and one line per confirmed prize payout, in the group's payments topic
|
||||
// (TG_CHAT / TG_PAY_TOPIC, the CTB Rewards bot TG_TOKEN, same as Downline Banners and the games). Sent once per transaction
|
||||
// across app copies (docstore.claim). Never posts anything older than 2 hours (a re-index after downtime must not flood the
|
||||
// topic). Off unless TG_TOKEN and TG_CHAT are set. TG_API (tests only) points at a stand-in.
|
||||
'use strict';
|
||||
const store = require('./store');
|
||||
const docstore = require('./docstore');
|
||||
|
||||
const SPLIT = { sponsorBps: 3000, prizeBps: 1000, denom: 10000 }; // VBBShop SPONSOR_BPS / PRIZE_BPS (constants in the contract)
|
||||
const ZERO = '0x0000000000000000000000000000000000000000';
|
||||
const ADDR_RE = /^0x[0-9a-fA-F]{40}$/;
|
||||
// Paid(uint256 indexed id, address indexed to, uint256 amount, uint8 role) / PaymentFailed(same): read from the purchase receipt
|
||||
const { Interface } = require('ethers');
|
||||
const EV = new Interface(['event Paid(uint256 indexed id, address indexed to, uint256 amount, uint8 role)', 'event PaymentFailed(uint256 indexed id, address indexed to, uint256 amount, uint8 role)']);
|
||||
const T_PAID = EV.getEvent('Paid').topicHash, T_FAIL = EV.getEvent('PaymentFailed').topicHash;
|
||||
const ROLE = ['sponsor', 'prize', 'company'];
|
||||
const CARDS = ['/art/proof/vbb-proof-pink.png', '/art/proof/vbb-proof-blue.png', '/art/proof/vbb-proof-yellow.png']; // rotated per post
|
||||
const st = { posted: 0, prizeLines: 0, skipped: 0, failed: 0, lastError: null };
|
||||
let C = null, shop = null, prize = null, names = null;
|
||||
const sent = new Set(); // this copy's own guard (docstore.claim covers app copies; without MySQL it always says yes)
|
||||
const once = k => { if (sent.has(k)) return false; sent.add(k); if (sent.size > 5000) sent.clear(); return true; };
|
||||
|
||||
function init(cfg, deps) { C = cfg; shop = deps.shop; prize = deps.prize; names = deps.nameOf || null; }
|
||||
const on = () => !!(process.env.TG_TOKEN && process.env.TG_CHAT);
|
||||
const lc = a => String(a || '').toLowerCase();
|
||||
const short = a => a ? a.slice(0, 6) + '...' + a.slice(-4) : '';
|
||||
function nameLocal(addr) { const m = store.member(lc(addr)); return m && m.username ? m.username : null; }
|
||||
async function nameOf(addr) {
|
||||
const a = lc(addr); const local = nameLocal(a); if (local) return local;
|
||||
if (names) { try { const n = await names(a); if (n) return n; } catch (e) {} }
|
||||
return null;
|
||||
}
|
||||
const who = (addr, name) => name ? '@' + name : short(lc(addr));
|
||||
const pol = wei => { const v = Number(BigInt(wei || 0) / 10n ** 12n) / 1e6; return v >= 100 ? v.toFixed(2) : v.toFixed(4); };
|
||||
const usd = cents => '$' + (Number(cents || 0) / 100).toFixed(2);
|
||||
const esc = s => String(s == null ? '' : s).replace(/[&<>]/g, c => ({ '&': '&', '<': '<', '>': '>' }[c]));
|
||||
|
||||
// what a purchase bought, in words (SKUs from config: packs and the banner look)
|
||||
function what(x) {
|
||||
if (x.credits > 0) return x.credits + ' post credits';
|
||||
if (Number(x.sku) === Number(C.lookSku)) return 'the banner look';
|
||||
return 'package #' + x.sku;
|
||||
}
|
||||
// the split of one purchase. From the receipt's Paid / PaymentFailed events when read, else from the contract's fixed math
|
||||
// (sponsorPaid from the Purchase event, prize = 10% of the price paid, company = the rest).
|
||||
function split(x) {
|
||||
if (Array.isArray(x.pays) && x.pays.length) return x.pays;
|
||||
let paid = 0n, sp = 0n; try { paid = BigInt(x.weiPaid || 0); sp = BigInt(x.sponsorPaid || 0); } catch (e) {}
|
||||
const prizeWei = paid * BigInt(SPLIT.prizeBps) / BigInt(SPLIT.denom);
|
||||
const out = [];
|
||||
if (x.sponsor && x.sponsor !== ZERO && sp > 0n) out.push({ role: 'sponsor', to: lc(x.sponsor), wei: sp.toString() });
|
||||
out.push({ role: 'prize', to: lc(C.prizePot.wallet), wei: prizeWei.toString() });
|
||||
out.push({ role: 'company', to: null, wei: (paid - sp - prizeWei).toString() });
|
||||
return out;
|
||||
}
|
||||
// the Paid / PaymentFailed events of one purchase, from its receipt (null if the RPC does not answer)
|
||||
async function readPays(tx, orderId) {
|
||||
const r = await shop.rpc('eth_getTransactionReceipt', [tx]); if (!r || !Array.isArray(r.logs)) return null;
|
||||
const out = [];
|
||||
for (const l of r.logs) {
|
||||
if (lc(l.address) !== lc(C.contractAddress) || (l.topics[0] !== T_PAID && l.topics[0] !== T_FAIL)) continue;
|
||||
const d = EV.parseLog({ topics: l.topics, data: l.data }).args; if (Number(d.id) !== Number(orderId)) continue;
|
||||
out.push({ role: ROLE[Number(d.role)] || 'role' + Number(d.role), to: lc(d.to), wei: d.amount.toString(), failed: l.topics[0] === T_FAIL || undefined });
|
||||
}
|
||||
return out.length ? out : null;
|
||||
}
|
||||
|
||||
// ---- public ledger ----
|
||||
function purchases() {
|
||||
const P = (store.state() && store.state().purchases) || {};
|
||||
return Object.entries(P).map(([k, x]) => Object.assign({ tx: k.split(':')[0] }, x));
|
||||
}
|
||||
function ledger(n) {
|
||||
const lim = Math.min(200, Math.max(1, Number(n) || 50));
|
||||
const rows = purchases().map(x => {
|
||||
const s = split(x);
|
||||
return { kind: 'purchase', tx: x.tx, at: (x.blockAt ? x.blockAt * 1000 : x.at) || null, orderId: x.orderId, buyer: x.buyer, buyerName: nameLocal(x.buyer), what: what(x),
|
||||
usdCents: x.usdCents, weiPaid: x.weiPaid, pays: s.map(p => ({ role: p.role, to: p.to, name: p.to ? nameLocal(p.to) : null, wei: p.wei, failed: p.failed || undefined })) };
|
||||
});
|
||||
for (const wk of (prize && prize.history ? prize.history(52) : [])) for (const w of wk.winners) {
|
||||
if (!w.tx) continue;
|
||||
rows.push({ kind: 'prize', tx: w.tx, at: wk.paidAt || null, week: wk.week, board: w.board, place: w.place, name: w.name, usd: w.usd, pol: w.pol, confirmed: !!w.confirmed });
|
||||
}
|
||||
rows.sort((a, b) => (b.at || 0) - (a.at || 0));
|
||||
const P = purchases(); let wei = 0n, cents = 0, sponsors = 0n;
|
||||
for (const x of P) { try { wei += BigInt(x.weiPaid || 0); sponsors += BigInt(x.sponsorPaid || 0); } catch (e) {} cents += Number(x.usdCents) || 0; }
|
||||
const prizesPaid = rows.filter(r => r.kind === 'prize' && r.confirmed).length;
|
||||
return { contract: C.contractAddress || null, explorer: C.explorer, items: rows.slice(0, lim),
|
||||
totals: { purchases: P.length, usdCents: cents, weiPaid: wei.toString(), sponsorWei: sponsors.toString(), prizePayouts: prizesPaid } };
|
||||
}
|
||||
|
||||
// ---- contract facts (cached 5 minutes) ----
|
||||
let cCache = null;
|
||||
async function contract() {
|
||||
if (cCache && Date.now() - cCache.at < 300000) return cCache.v;
|
||||
const v = { address: C.contractAddress || null, chainId: C.chainId, explorer: C.explorer, split: { sponsorPct: 30, prizePct: 10, companyPct: 60 },
|
||||
// Marty 2026-11-14: source verified on Sourcify (exact match, 2026-11-13); Polygonscan's own verification is pending
|
||||
verified: { sourcify: true, polygonscan: 'pending', sourcifyUrl: C.contractAddress ? 'https://repo.sourcify.dev/' + C.chainId + '/' + C.contractAddress : null },
|
||||
ownerNote: "Marty's Tangem hardware wallet", live: false };
|
||||
if (shop && shop.watching()) {
|
||||
const I = new Interface(['function owner() view returns (address)', 'function company() view returns (address)', 'function keeper() view returns (address)',
|
||||
'function prizeWallet() view returns (address)', 'function paused() view returns (bool)', 'function totalOwed() view returns (uint256)', 'function orderCount() view returns (uint256)']);
|
||||
const read = async fn => I.decodeFunctionResult(fn, await shop.rpc('eth_call', [{ to: C.contractAddress, data: I.encodeFunctionData(fn, []) }, 'latest']))[0];
|
||||
try {
|
||||
const [owner, company, keeper, prizeWallet, paused, totalOwed, orderCount, bal] = await Promise.all(['owner', 'company', 'keeper', 'prizeWallet', 'paused', 'totalOwed', 'orderCount'].map(read)
|
||||
.concat([shop.rpc('eth_getBalance', [C.contractAddress, 'latest'])]));
|
||||
Object.assign(v, { owner: lc(owner), company: lc(company), keeper: lc(keeper), prizeWallet: lc(prizeWallet), paused: !!paused, totalOwedWei: totalOwed.toString(),
|
||||
orderCount: Number(orderCount), balanceWei: BigInt(bal).toString(), live: true, readAt: Date.now() });
|
||||
} catch (e) { v.error = 'The chain did not answer just now. Try again in a minute.'; }
|
||||
}
|
||||
cCache = { at: Date.now(), v: v };
|
||||
if (v.error) cCache.at = Date.now() - 240000; // retry sooner
|
||||
return v;
|
||||
}
|
||||
|
||||
// ---- Telegram ----
|
||||
async function tg(method, body) {
|
||||
const base = String(process.env.TG_API || 'https://api.telegram.org').replace(/\/+$/, '');
|
||||
const b = Object.assign({ chat_id: process.env.TG_CHAT, parse_mode: 'HTML' }, body);
|
||||
if (process.env.TG_PAY_TOPIC) b.message_thread_id = Number(process.env.TG_PAY_TOPIC);
|
||||
const r = await fetch(base + '/bot' + process.env.TG_TOKEN + '/' + method, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(b), signal: AbortSignal.timeout(15000) });
|
||||
const j = await r.json().catch(() => ({}));
|
||||
if (!j.ok) { st.failed++; st.lastError = String(j.description || r.status).slice(0, 160); console.error('proof: telegram', method, 'failed', r.status, st.lastError); return false; }
|
||||
return true;
|
||||
}
|
||||
// this week's numbers (Central-time week): purchases and dollars from the credited events, the prize pot the site already shows
|
||||
function weekLine() {
|
||||
const wk = store.ctWeek(); const s = shop.weekSales(wk, store.ctWeek); let potUsd = null;
|
||||
try { potUsd = prize.pot(wk).potUsd; } catch (e) {}
|
||||
return '\u{1F4CA} This week: ' + s.purchases + ' purchase' + (s.purchases === 1 ? '' : 's') + ', ' + usd(s.cents) + (potUsd != null ? ' · prize pot $' + Number(potUsd).toFixed(2) : '');
|
||||
}
|
||||
async function caption(x) {
|
||||
const lines = ['\u{1F4A5} <b>Viral Banner Blitz</b>', '\u{1F9FE} ' + esc(who(x.buyer, await nameOf(x.buyer))) + ' bought ' + esc(what(x)) + ' · ' + usd(x.usdCents) + ' (' + pol(x.weiPaid) + ' POL)'];
|
||||
for (const p of split(x)) {
|
||||
if (p.failed) { lines.push('⚠️ ' + (p.role === 'sponsor' ? 'Sponsor' : p.role) + ' payment to ' + esc(who(p.to, await nameOf(p.to))) + ' bounced; it waits in the contract for them to claim'); continue; }
|
||||
if (p.role === 'sponsor') lines.push('\u{1F4B8} Sponsor 30%: ' + pol(p.wei) + ' POL → ' + esc(who(p.to, await nameOf(p.to))));
|
||||
else if (p.role === 'prize') lines.push('\u{1F3C6} Weekly prize pot 10%: ' + pol(p.wei) + ' POL');
|
||||
else if (p.role === 'company') lines.push('\u{1F3E6} Viral Banner Blitz: ' + pol(p.wei) + ' POL');
|
||||
}
|
||||
lines.push('Split by the contract in this same transaction. The contract keeps nothing and there is nothing to withdraw.');
|
||||
lines.push(weekLine());
|
||||
lines.push('· <a href="' + esc(C.explorer) + '/tx/' + esc(x.tx) + '">Verify on Polygonscan</a> · <a href="https://' + esc(C.site) + '/ledger">Live ledger</a>');
|
||||
return lines.join('\n');
|
||||
}
|
||||
let card = 0;
|
||||
// shop.js calls this once per newly credited purchase (rec = the stored purchase, tx = its transaction)
|
||||
function onPurchase(rec, tx) {
|
||||
const x = Object.assign({ tx }, rec);
|
||||
(async () => {
|
||||
// the real split from the receipt (a bounced push shows as owed), kept on the purchase for the ledger
|
||||
try { const pays = await readPays(tx, rec.orderId); if (pays) { const S = store.state(); const k = Object.keys(S.purchases || {}).find(k2 => k2.startsWith(lc(tx) + ':') && S.purchases[k2].orderId === rec.orderId); if (k) { S.purchases[k].pays = pays; store.save(); } x.pays = pays; } } catch (e) {}
|
||||
if (!on()) return;
|
||||
const at = (rec.blockAt ? rec.blockAt * 1000 : rec.at) || Date.now();
|
||||
if (Date.now() - at > 2 * 3600000) { st.skipped++; return; }
|
||||
const text = await caption(x);
|
||||
if (!once('p:' + lc(tx) + ':' + rec.orderId) || !(await docstore.claim('vbbtg:' + lc(tx) + ':' + rec.orderId))) return; // another app copy already posted this purchase
|
||||
const photo = 'https://' + C.site + CARDS[card++ % CARDS.length];
|
||||
let ok = await tg('sendPhoto', { photo: process.env.TG_PHOTO_BASE ? String(process.env.TG_PHOTO_BASE).replace(/\/+$/, '') + CARDS[(card - 1) % CARDS.length] : photo, caption: text });
|
||||
if (!ok) ok = await tg('sendMessage', { text, disable_web_page_preview: true }); // a photo the API cannot fetch still gets its proof line
|
||||
if (ok) { st.posted++; console.log('proof: posted purchase', String(tx).slice(0, 12)); }
|
||||
})().catch(e => { st.failed++; st.lastError = String(e.message).slice(0, 160); });
|
||||
}
|
||||
// prize.js calls this when a prize transfer confirms on chain
|
||||
function onPrize(plan, t) {
|
||||
if (!on() || !t || !t.tx) return;
|
||||
(async () => {
|
||||
if (t.sentAt && Date.now() - t.sentAt > 2 * 3600000) { st.skipped++; return; }
|
||||
if (!once('z:' + lc(t.tx)) || !(await docstore.claim('vbbtg-prize:' + lc(t.tx)))) return;
|
||||
const board = t.board === 'sources' ? 'most traffic sources' : 'most verified visitors';
|
||||
const place = ['1st', '2nd', '3rd'][t.place - 1] || ('#' + t.place);
|
||||
const text = '\u{1F3C6} <b>Viral Banner Blitz weekly prize</b>\n' + esc(t.name || short(t.address)) + ' · ' + place + ' place, ' + board + ' (week of ' + esc(plan.week) + '): '
|
||||
+ esc(t.pol) + ' POL ($' + Number(t.usd).toFixed(2) + ')\n· <a href="' + esc(C.explorer) + '/tx/' + esc(t.tx) + '">Verify on Polygonscan</a> · <a href="https://' + esc(C.site) + '/ledger">Live ledger</a>';
|
||||
if (await tg('sendMessage', { text, disable_web_page_preview: true })) { st.prizeLines++; console.log('proof: posted prize', String(t.tx).slice(0, 12)); }
|
||||
})().catch(e => { st.failed++; st.lastError = String(e.message).slice(0, 160); });
|
||||
}
|
||||
function view() { return Object.assign({ telegram: on(), topic: process.env.TG_PAY_TOPIC || null }, st); }
|
||||
module.exports = { init, ledger, contract, onPurchase, onPrize, caption, split, view, on, CARDS };
|
||||
+2
-2
@@ -22,7 +22,7 @@
|
||||
<meta name="theme-color" content="#ffd400">
|
||||
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=DM+Sans:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=5">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=6">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
@@ -36,7 +36,7 @@
|
||||
</div>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=4"></script>
|
||||
<script src="/assets/common.js?v=5"></script>
|
||||
<script src="/assets/admin.js?v=2"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 111 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 111 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 112 KiB |
+36
-6
@@ -47,25 +47,55 @@ window.VBB = (function () {
|
||||
const f = document.createElement('footer'); f.className = 'foot';
|
||||
f.innerHTML = '<div class="wrap"><p><b>Viral Banner Blitz</b>, part of the Crypto Team Build Network</p>'
|
||||
+ '<p>A banner that cycles earns advertising across the network, not cash. Nothing here is an income opportunity.</p>'
|
||||
+ '<p><a href="/">The loop</a> · <a href="/leaders">Leaderboards</a> · <a href="/how">How it works</a> · <a href="/packages">Packages</a> · <a href="/promote">Promote</a> · <a href="/my">My Banners</a></p></div>';
|
||||
+ '<p><a href="/">The loop</a> · <a href="/leaders">Leaderboards</a> · <a href="/how">How it works</a> · <a href="/packages">Packages</a> · <a href="/promote">Promote</a> · <a href="/my">My Banners</a></p>'
|
||||
// trust pack (Marty 2026-11-14): legal + proof links, company line, and the network line served by the hub
|
||||
+ '<p class="legal-links"><a href="/terms">Terms</a> · <a href="/disclaimer">Earnings Disclaimer</a> · <a href="/privacy">Privacy</a> · <a href="/contract">Contract</a> · <a href="/ledger">Ledger</a> · <a href="https://instantadpay.com/support" target="_blank" rel="noopener">Support</a></p>'
|
||||
+ '<p class="co">TrustClickz · 615 Green Valley Drive, Moody, AL 35004</p><p class="netline"></p></div>';
|
||||
document.body.appendChild(f);
|
||||
netLine(f.querySelector('.netline'));
|
||||
toasts();
|
||||
}
|
||||
// live cycle toasts: real cycles from the ledger only, bottom-left, one at a time, never older than 30 minutes
|
||||
// "Part of the network": the list comes from the hub through /api/network-sites, the built-in copy if it does not answer
|
||||
const NET = [['iap', 'InstantAdPay', 'https://instantadpay.com'], ['linkspin', 'LinkSpin', 'https://linkspin.app'], ['dlb', 'Downline Banners', 'https://downlinebanners.com'],
|
||||
['vbb', 'Viral Banner Blitz', 'https://viralbannerblitz.com'], ['stackpol', 'Stack POL', 'https://stackpol.com'], ['earnerscorner', 'Earners Corner', 'https://earnerscorner.com']].map(a => ({ id: a[0], name: a[1], url: a[2] }));
|
||||
function netLine(el) {
|
||||
if (!el) return;
|
||||
const paint = list => { el.innerHTML = '<b>Part of the network</b> · One account across the network: ' + list.map(s => (s.id === 'vbb' || /viralbannerblitz\.com/.test(s.url))
|
||||
? '<span class="here" aria-current="page">' + esc(s.name) + '</span>' : '<a href="' + esc(s.url) + '" target="_blank" rel="noopener">' + esc(s.name) + '</a>').join(' · '); };
|
||||
paint(NET);
|
||||
fetch('/api/network-sites').then(r => r.json()).then(l => { if (Array.isArray(l) && l.length) paint(l); }).catch(() => {});
|
||||
}
|
||||
// live toasts: real cycles, purchases and prize payouts only, bottom-left, one at a time, never older than 30 minutes
|
||||
let toastsOn = false;
|
||||
function toasts() {
|
||||
if (toastsOn) return; toastsOn = true;
|
||||
const seen = new Set(); let first = true;
|
||||
const box = document.createElement('div'); box.className = 'toasts'; box.setAttribute('aria-live', 'polite'); document.body.appendChild(box);
|
||||
const polOf = w => { try { const v = Number(BigInt(w || 0) / 10n ** 14n) / 1e4; return v.toFixed(v >= 100 ? 2 : 4); } catch (e) { return '0'; } };
|
||||
const whoOf = (a, nm) => nm ? '@' + esc(nm) : esc(short(String(a || '')));
|
||||
const show = c => {
|
||||
const el = document.createElement('a'); el.className = 'toast'; el.href = '/how';
|
||||
el.innerHTML = '<b>' + (c.name ? esc(c.name) + '\'s banner' : 'A banner') + ' just cycled</b><br><span>' + n(c.views) + ' network ad views earned for its owner</span>';
|
||||
const el = document.createElement('a'); el.className = 'toast';
|
||||
if (c.kind === 'purchase') { // trust pack 2026-11-14: real purchases from the ledger, with the sponsor paid in the same transaction
|
||||
const sp = (c.pays || []).find(p => p.role === 'sponsor' && !p.failed);
|
||||
el.href = '/ledger'; el.className = 'toast buy';
|
||||
el.innerHTML = '<b>' + whoOf(c.buyer, c.buyerName) + ' bought ' + esc(c.what) + '</b><br><span>' + (sp ? whoOf(sp.to, sp.name) + ' got ' + polOf(sp.wei) + ' POL, same transaction' : 'paid on-chain, split by the contract') + '</span>';
|
||||
} else if (c.kind === 'prize') {
|
||||
el.href = '/ledger'; el.className = 'toast prize';
|
||||
el.innerHTML = '<b>' + esc(c.name) + ' won a weekly prize</b><br><span>' + esc(c.pol) + ' POL paid on-chain</span>';
|
||||
} else {
|
||||
el.href = '/how';
|
||||
el.innerHTML = '<b>' + (c.name ? esc(c.name) + '\'s banner' : 'A banner') + ' just cycled</b><br><span>' + n(c.views) + ' network ad views earned for its owner</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/recent'); } catch (e) { return; } if (!d || !d.cycles) return;
|
||||
const fresh = d.cycles.filter(c => !seen.has(c.id)); d.cycles.forEach(c => seen.add(c.id));
|
||||
const [d, l] = await Promise.all([getJSON('/api/recent').catch(() => null), getJSON('/api/ledger?n=6').catch(() => null)]);
|
||||
const all = [];
|
||||
((d && d.cycles) || []).forEach(c => all.push(Object.assign({ key: 'c' + c.id }, c)));
|
||||
((l && l.items) || []).filter(x => x.at && Date.now() - x.at < 30 * 60000).forEach(x => all.push(Object.assign({ key: x.kind + x.tx + (x.place || '') + (x.board || '') }, x)));
|
||||
all.sort((a, b) => (b.at || 0) - (a.at || 0));
|
||||
const fresh = all.filter(c => !seen.has(c.key)); all.forEach(c => seen.add(c.key));
|
||||
const list = first ? fresh.slice(0, 1) : fresh.reverse(); first = false;
|
||||
list.slice(0, 3).forEach((c, i) => setTimeout(() => show(c), 1500 + i * 8000));
|
||||
};
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
// Contract proof page (trust pack 2026-11-14): live facts from /api/contract (read from Polygon, cached 5 minutes on the server).
|
||||
(async function () {
|
||||
VBB.renderNav('/contract'); VBB.renderFooter();
|
||||
const el = document.getElementById('facts'); const esc = VBB.esc;
|
||||
let d; try { d = await VBB.getJSON('/api/contract'); } catch (e) { d = {}; }
|
||||
const ex = d.explorer || 'https://polygonscan.com';
|
||||
const addr = (a, note) => a ? '<a class="mono" href="' + esc(ex) + '/address/' + esc(a) + '" target="_blank" rel="noopener">' + esc(VBB.short(a)) + '</a>' + (note ? '<br><span class="muted small">' + note + '</span>' : '') : '<span class="muted">not read yet</span>';
|
||||
const pol = w => { try { const v = BigInt(w || 0); return (Number(v / 10n ** 14n) / 1e4).toFixed(4) + ' POL'; } catch (e) { return '0 POL'; } };
|
||||
if (!d.address) { el.innerHTML = '<tr><td class="muted">The contract address is not set on this copy of the site.</td></tr>'; return; }
|
||||
const rows = [
|
||||
['Contract', addr(d.address, 'VBBShop on ' + (d.chainId === 137 ? 'Polygon' : 'chain ' + d.chainId))],
|
||||
['Source code', 'Verified on <a href="' + esc(d.verified && d.verified.sourcifyUrl || '#') + '" target="_blank" rel="noopener">Sourcify</a> (exact match). Polygonscan verification: ' + esc(d.verified && d.verified.polygonscan === 'pending' ? 'pending' : 'done')],
|
||||
['Owner', addr(d.owner, 'A Tangem hardware wallet. It can pause new sales, set package prices, and change the keeper and the prize wallet. It cannot move anyone\'s money or change the split.')],
|
||||
['Prize wallet', addr(d.prizeWallet, 'Receives the 10% prize share of each purchase and pays the weekly leaderboard winners.')],
|
||||
['Company', addr(d.company, 'Viral Banner Blitz. Fixed in the contract when it was deployed.')],
|
||||
['Keeper', addr(d.keeper, 'The site\'s signing key. It only signs which sponsor a buyer has, once, on their first purchase.')],
|
||||
['Sales', d.live ? (d.paused ? '<b>Paused</b>' : 'Open') + ' · ' + VBB.n(d.orderCount) + ' purchases so far' : '<span class="muted">' + esc(d.error || 'not read yet') + '</span>'],
|
||||
['Held by the contract', d.live ? pol(d.balanceWei) + (BigInt(d.totalOwedWei || 0) > 0n ? ' (all of it owed to wallets whose payment bounced, waiting for them to claim)' : ' (nothing is kept: every purchase is paid out in the same transaction)') : '<span class="muted">not read yet</span>']
|
||||
];
|
||||
el.innerHTML = '<tbody>' + rows.map(r => '<tr><th style="width:30%">' + r[0] + '</th><td>' + r[1] + '</td></tr>').join('') + '</tbody>';
|
||||
})();
|
||||
@@ -0,0 +1,31 @@
|
||||
// Live ledger (trust pack 2026-11-14): purchases with their split and weekly prize payouts from /api/ledger, refreshed every 30 s.
|
||||
(function () {
|
||||
VBB.renderNav('/ledger'); VBB.renderFooter();
|
||||
const esc = VBB.esc;
|
||||
const pol = w => { try { const v = BigInt(w || 0); const n = Number(v / 10n ** 12n) / 1e6; return (n >= 100 ? n.toFixed(2) : n.toFixed(4)) + ' POL'; } catch (e) { return '0 POL'; } };
|
||||
const usd = c => '$' + (Number(c || 0) / 100).toFixed(2);
|
||||
const when = t => t ? new Date(t).toLocaleString('en-US', { timeZone: 'America/Chicago', month: 'short', day: 'numeric', hour: 'numeric', minute: '2-digit' }) + ' CT' : '';
|
||||
const who = (a, n) => n ? '@' + esc(n) : '<span class="mono">' + esc(VBB.short(a || '')) + '</span>';
|
||||
const ROLE = { sponsor: 'Sponsor 30%', prize: 'Prize pot 10%', company: 'Viral Banner Blitz' };
|
||||
async function load() {
|
||||
let d; try { d = await VBB.getJSON('/api/ledger?n=100'); } catch (e) { return; } if (!d || !d.items) return;
|
||||
const ex = d.explorer || 'https://polygonscan.com'; const t = d.totals || {};
|
||||
document.getElementById('totals').innerHTML = '<div class="stat"><b>' + VBB.n(t.purchases) + '</b><span>purchases on-chain</span></div>'
|
||||
+ '<div class="stat"><b>' + pol(t.sponsorWei) + '</b><span>paid to sponsors, same transaction</span></div>'
|
||||
+ '<div class="stat"><b>' + VBB.n(t.prizePayouts) + '</b><span>weekly prize payouts</span></div>'
|
||||
+ '<div class="stat"><b>0</b><span>withdrawals needed: every purchase pays out in the same transaction</span></div>';
|
||||
const body = document.querySelector('#rows tbody');
|
||||
if (!d.items.length) { body.innerHTML = '<tr><td colspan="4" class="muted">No purchases yet. The first one will show here within a minute of its transaction.</td></tr>'; return; }
|
||||
body.innerHTML = d.items.map(r => {
|
||||
const link = '<a href="' + esc(ex) + '/tx/' + esc(r.tx) + '" target="_blank" rel="noopener">Polygonscan</a>';
|
||||
if (r.kind === 'prize') {
|
||||
const place = ['1st', '2nd', '3rd'][r.place - 1] || '#' + r.place;
|
||||
return '<tr><td class="small">' + when(r.at) + '</td><td><span class="pill cycled">Prize</span><br>' + esc(r.name) + ', ' + place + ' place, ' + (r.board === 'sources' ? 'most traffic sources' : 'most verified visitors') + ' (week of ' + esc(r.week) + ')</td>'
|
||||
+ '<td class="small">' + esc(r.pol) + ' POL ($' + Number(r.usd).toFixed(2) + ') from the prize wallet' + (r.confirmed ? '' : ' <span class="muted">(confirming)</span>') + '</td><td>' + link + '</td></tr>';
|
||||
}
|
||||
const pays = (r.pays || []).map(p => esc(ROLE[p.role] || p.role) + ': ' + pol(p.wei) + (p.role === 'sponsor' ? ' to ' + who(p.to, p.name) : '') + (p.failed ? ' <span class="muted">(bounced, waiting in the contract for them to claim)</span>' : '')).join('<br>');
|
||||
return '<tr><td class="small">' + when(r.at) + '</td><td><span class="pill loop">Purchase</span><br>' + who(r.buyer, r.buyerName) + ' bought ' + esc(r.what) + ' for ' + usd(r.usdCents) + '</td><td class="small">' + pays + '</td><td>' + link + '</td></tr>';
|
||||
}).join('');
|
||||
}
|
||||
load(); setInterval(load, 30000);
|
||||
})();
|
||||
@@ -178,3 +178,10 @@ footer.foot a{color:var(--amber)} footer.foot p{margin:6px 0}
|
||||
.fill-note{margin-top:6px}
|
||||
.ls-box{margin-top:16px;padding-top:12px;border-top:1.5px dashed var(--muted)}
|
||||
.pill.spin{background:var(--sky-soft);color:var(--ink)}
|
||||
/* trust pack (2026-11-14): footer legal + network line, proof toasts, legal pages */
|
||||
footer.foot .legal-links{margin-top:14px} footer.foot .co{opacity:.8;font-size:12.5px}
|
||||
footer.foot .netline{margin-top:12px;padding-top:12px;border-top:1px dashed rgba(217,212,234,.3);font-size:13px;line-height:1.9}
|
||||
footer.foot .netline b{color:#fff} footer.foot .netline .here{color:#fff;font-weight:700;background:var(--hot);border:1.5px solid #fff;border-radius:999px;padding:1px 8px}
|
||||
.toast.buy{background:var(--amber-soft)} .toast.prize{background:var(--ok-soft)}
|
||||
.legal .card h2{font-size:21px} .legal .card p,.legal .card li{max-width:760px} .legal .card ul{padding-left:20px} .legal .card li{margin:6px 0}
|
||||
#facts th{font:700 11.5px var(--mono);letter-spacing:.06em;text-transform:uppercase;vertical-align:top}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
|
||||
<title>Contract Proof | Viral Banner Blitz</title>
|
||||
<meta name="description" content="The Viral Banner Blitz shop contract on Polygon: verified source, owner, prize wallet and the fixed 30/10/60 split, read live from the chain.">
|
||||
<link rel="canonical" href="https://viralbannerblitz.com/contract">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:site_name" content="Viral Banner Blitz">
|
||||
<meta property="og:title" content="Contract Proof | Viral Banner Blitz">
|
||||
<meta property="og:description" content="The Viral Banner Blitz shop contract on Polygon: verified source, owner, prize wallet and the fixed 30/10/60 split, read live from the chain.">
|
||||
<meta property="og:url" content="https://viralbannerblitz.com/contract">
|
||||
<meta property="og:image" content="https://viralbannerblitz.com/art/og-share.png">
|
||||
<meta property="og:image:width" content="1200">
|
||||
<meta property="og:image:height" content="630">
|
||||
<meta property="og:image:alt" content="Viral Banner Blitz: a community banner loop that moves with every verified visitor">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="Contract Proof | Viral Banner Blitz">
|
||||
<meta name="twitter:description" content="The Viral Banner Blitz shop contract on Polygon: verified source, owner, prize wallet and the fixed 30/10/60 split, read live from the chain.">
|
||||
<meta name="twitter:image" content="https://viralbannerblitz.com/art/og-share.png">
|
||||
|
||||
<meta name="theme-color" content="#ffd400">
|
||||
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=DM+Sans:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=6">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
<section class="hero"><span class="eyebrow"><i></i>Read live from Polygon</span><h1>Contract <em>proof</em></h1><p class="lead">Every Viral Banner Blitz purchase is paid to one smart contract on Polygon. It splits the payment in the same transaction. Check every number here yourself.</p></section>
|
||||
<div class="card">
|
||||
<h2>The contract</h2>
|
||||
<table class="t" id="facts"><tbody><tr><td class="muted">Reading the contract...</td></tr></tbody></table>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h2>Where each purchase goes, in the same transaction</h2>
|
||||
<div class="stats">
|
||||
<div class="stat"><b>30%</b><span>to the network member who introduced the buyer (no sponsor: to Viral Banner Blitz)</span></div>
|
||||
<div class="stat"><b>10%</b><span>to the prize wallet, which pays the weekly leaderboard prizes</span></div>
|
||||
<div class="stat"><b>60%</b><span>to Viral Banner Blitz</span></div>
|
||||
</div>
|
||||
<p class="muted small">The percentages are constants in the contract code: nobody can change who gets what share. There is no owner withdraw. The contract keeps nothing: if a payment cannot be delivered, it waits in the contract for that wallet to claim, and nobody else can take it. Anything sent above the price comes back in the same transaction.</p>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h2>Check it yourself</h2>
|
||||
<ol class="small">
|
||||
<li>Open the contract on Polygonscan (link above). Its source code is verified on Sourcify (exact match); Polygonscan's own verification check is pending, so use the Sourcify link to read the source.</li>
|
||||
<li>On Polygonscan, choose <b>Read Contract</b> and compare owner, prize wallet, company and keeper with this page.</li>
|
||||
<li>Open any purchase in the <a href="/ledger">live ledger</a> and look at its <b>Logs</b>: one Purchase event, then one Paid event per payment.</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=5"></script>
|
||||
<script src="/assets/contract.js?v=1"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,40 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
|
||||
<title>Earnings Disclaimer | Viral Banner Blitz</title>
|
||||
<meta name="description" content="Viral Banner Blitz sells advertising, not income. No earnings are promised; any payment happens only on-chain when later purchases happen.">
|
||||
<link rel="canonical" href="https://viralbannerblitz.com/disclaimer">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:site_name" content="Viral Banner Blitz">
|
||||
<meta property="og:title" content="Earnings Disclaimer | Viral Banner Blitz">
|
||||
<meta property="og:description" content="Viral Banner Blitz sells advertising, not income. No earnings are promised; any payment happens only on-chain when later purchases happen.">
|
||||
<meta property="og:url" content="https://viralbannerblitz.com/disclaimer">
|
||||
<meta property="og:image" content="https://viralbannerblitz.com/art/og-share.png">
|
||||
<meta property="og:image:width" content="1200">
|
||||
<meta property="og:image:height" content="630">
|
||||
<meta property="og:image:alt" content="Viral Banner Blitz: a community banner loop that moves with every verified visitor">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="Earnings Disclaimer | Viral Banner Blitz">
|
||||
<meta name="twitter:description" content="Viral Banner Blitz sells advertising, not income. No earnings are promised; any payment happens only on-chain when later purchases happen.">
|
||||
<meta name="twitter:image" content="https://viralbannerblitz.com/art/og-share.png">
|
||||
|
||||
<meta name="theme-color" content="#ffd400">
|
||||
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=DM+Sans:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=6">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap legal">
|
||||
<section class="hero"><h1>Earnings Disclaimer</h1><p class="lead">Please read this before you buy anything.</p><p class="muted small">Last updated November 14, 2026</p></section>
|
||||
<div class="card"><h2>Advertising, not an investment</h2><p>Viral Banner Blitz sells advertising. It is not an investment, a security, a savings plan or an income opportunity, and nothing you buy here is a promise of money back.</p></div>
|
||||
<div class="card"><h2>No earnings promised</h2><p>The sponsor share is paid only when someone you introduced chooses to buy a package. If nobody does, you receive nothing from it.</p><p>Weekly prizes go only to the top three on each leaderboard. Your rank depends on what every other member does that week, and most members will not win a prize in a given week. A prize is a promotion, not a return on anything you bought.</p><p>Network ad views earned when a banner cycles are advertising, not cash, and have no cash value.</p><p>We do not promise, project or guarantee any earnings. Any numbers in examples, posts, banners or videos are illustrations or one member's results, not what you should expect.</p></div>
|
||||
<div class="card"><h2>How any payment happens</h2><p>Any payment to you happens only on the blockchain, when a later purchase happens, and is paid by the smart contract in that same transaction. Nothing is held for you and there is nothing to withdraw. If no later purchase happens, no payment happens.</p></div>
|
||||
<div class="card"><h2>Crypto risk</h2><ul><li>The price of POL moves. The dollar value of a payment can be higher or lower later than when it was paid.</li><li>You are responsible for your wallet and its recovery phrase. Nobody, including us, can recover a lost wallet or reverse a payment sent from it.</li><li>Blockchain transactions are final. Each one costs a small network fee (gas) in POL, paid to the network, not to us.</li><li>Use SafePal or any other crypto wallet you trust, and never share your recovery phrase with anyone. We will never ask for it.</li></ul></div>
|
||||
<div class="card"><h2>Your decision</h2><p>Only spend what you can afford to lose completely. This is not financial, legal or tax advice. You are responsible for any taxes on what you receive.</p></div>
|
||||
<div class="card"><h2>Contact</h2><p>Questions, problems or a request about your data: <a href="https://instantadpay.com/support" target="_blank" rel="noopener">network support</a>, or write to TrustClickz, 615 Green Valley Drive, Moody, AL 35004.</p></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=5"></script>
|
||||
<script src="/assets/static.js?v=1"></script>
|
||||
</body>
|
||||
</html>
|
||||
+2
-2
@@ -22,7 +22,7 @@
|
||||
<meta name="theme-color" content="#ffd400">
|
||||
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=DM+Sans:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=5">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=6">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
@@ -55,7 +55,7 @@
|
||||
</div>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=4"></script>
|
||||
<script src="/assets/common.js?v=5"></script>
|
||||
<script src="/assets/static.js?v=1"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@
|
||||
<meta name="theme-color" content="#ffd400">
|
||||
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=DM+Sans:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=5">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=6">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
@@ -56,7 +56,7 @@
|
||||
</div>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=4"></script>
|
||||
<script src="/assets/common.js?v=5"></script>
|
||||
<script src="/assets/splash.js?v=3"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+2
-2
@@ -22,7 +22,7 @@
|
||||
<meta name="theme-color" content="#ffd400">
|
||||
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=DM+Sans:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=5">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=6">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
@@ -33,7 +33,7 @@
|
||||
<div class="card" id="pastCard" hidden><h2>Past winners</h2><p class="muted small">Paid in POL from the prize wallet at the POL price at payout time. Every payment is a public Polygon transaction.</p><div class="past" id="past"></div></div>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=4"></script>
|
||||
<script src="/assets/common.js?v=5"></script>
|
||||
<script src="/assets/leaders.js?v=3"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
|
||||
<title>Live Ledger | Viral Banner Blitz</title>
|
||||
<meta name="description" content="Every Viral Banner Blitz purchase and weekly prize payout on Polygon, with the split paid in the same transaction and a link to verify each one.">
|
||||
<link rel="canonical" href="https://viralbannerblitz.com/ledger">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:site_name" content="Viral Banner Blitz">
|
||||
<meta property="og:title" content="Live Ledger | Viral Banner Blitz">
|
||||
<meta property="og:description" content="Every Viral Banner Blitz purchase and weekly prize payout on Polygon, with the split paid in the same transaction and a link to verify each one.">
|
||||
<meta property="og:url" content="https://viralbannerblitz.com/ledger">
|
||||
<meta property="og:image" content="https://viralbannerblitz.com/art/og-share.png">
|
||||
<meta property="og:image:width" content="1200">
|
||||
<meta property="og:image:height" content="630">
|
||||
<meta property="og:image:alt" content="Viral Banner Blitz: a community banner loop that moves with every verified visitor">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="Live Ledger | Viral Banner Blitz">
|
||||
<meta name="twitter:description" content="Every Viral Banner Blitz purchase and weekly prize payout on Polygon, with the split paid in the same transaction and a link to verify each one.">
|
||||
<meta name="twitter:image" content="https://viralbannerblitz.com/art/og-share.png">
|
||||
|
||||
<meta name="theme-color" content="#ffd400">
|
||||
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=DM+Sans:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=6">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
<section class="hero"><span class="eyebrow"><i></i>Live from Polygon</span><h1>The live <em>ledger</em></h1><p class="lead">Every purchase and every weekly prize payout, with the transaction to check it. Purchases are split by the contract in the same transaction they are paid.</p></section>
|
||||
<div class="stats" id="totals"></div>
|
||||
<div class="card">
|
||||
<h2>Purchases and prize payouts</h2>
|
||||
<div style="overflow-x:auto"><table class="t" id="rows"><thead><tr><th>When</th><th>What happened</th><th>Paid in the same transaction</th><th>Verify</th></tr></thead><tbody><tr><td colspan="4" class="muted">Loading...</td></tr></tbody></table></div>
|
||||
<p class="muted small">Purchases buy advertising: post credits and the banner look. They are not an investment and nothing is promised. Prize payouts go from the prize wallet to the weekly leaderboard winners. <a href="/contract">How to check the contract</a>.</p>
|
||||
</div>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=5"></script>
|
||||
<script src="/assets/ledger.js?v=1"></script>
|
||||
</body>
|
||||
</html>
|
||||
+2
-2
@@ -22,7 +22,7 @@
|
||||
<meta name="theme-color" content="#ffd400">
|
||||
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=DM+Sans:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=5">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=6">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
@@ -78,7 +78,7 @@
|
||||
</div>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=4"></script>
|
||||
<script src="/assets/common.js?v=5"></script>
|
||||
<script src="/assets/wallet.js?v=2"></script>
|
||||
<script src="/assets/buy.js?v=1"></script>
|
||||
<script src="/assets/my.js?v=3"></script>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<meta name="theme-color" content="#ffd400">
|
||||
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=DM+Sans:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=5">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=6">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
@@ -43,7 +43,7 @@
|
||||
<div class="card center"><p>Every network member (InstantAdPay or LinkSpin) also gets one free post credit each day they sign in.</p><a class="btn sec" href="/my">Use my free credit</a></div>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=4"></script>
|
||||
<script src="/assets/common.js?v=5"></script>
|
||||
<script src="/assets/wallet.js?v=2"></script>
|
||||
<script src="/assets/buy.js?v=1"></script>
|
||||
<script src="/assets/packages.js?v=1"></script>
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
|
||||
<title>Privacy Policy | Viral Banner Blitz</title>
|
||||
<meta name="description" content="What Viral Banner Blitz collects (wallet, username, visit checks), how the network shares one account through the hub, and what is public on the blockchain.">
|
||||
<link rel="canonical" href="https://viralbannerblitz.com/privacy">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:site_name" content="Viral Banner Blitz">
|
||||
<meta property="og:title" content="Privacy Policy | Viral Banner Blitz">
|
||||
<meta property="og:description" content="What Viral Banner Blitz collects (wallet, username, visit checks), how the network shares one account through the hub, and what is public on the blockchain.">
|
||||
<meta property="og:url" content="https://viralbannerblitz.com/privacy">
|
||||
<meta property="og:image" content="https://viralbannerblitz.com/art/og-share.png">
|
||||
<meta property="og:image:width" content="1200">
|
||||
<meta property="og:image:height" content="630">
|
||||
<meta property="og:image:alt" content="Viral Banner Blitz: a community banner loop that moves with every verified visitor">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="Privacy Policy | Viral Banner Blitz">
|
||||
<meta name="twitter:description" content="What Viral Banner Blitz collects (wallet, username, visit checks), how the network shares one account through the hub, and what is public on the blockchain.">
|
||||
<meta name="twitter:image" content="https://viralbannerblitz.com/art/og-share.png">
|
||||
|
||||
<meta name="theme-color" content="#ffd400">
|
||||
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=DM+Sans:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=6">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap legal">
|
||||
<section class="hero"><h1>Privacy Policy</h1><p class="lead">What we collect, why, and who sees it.</p><p class="muted small">Last updated November 14, 2026</p></section>
|
||||
<div class="card"><h2>Who we are</h2><p>Viral Banner Blitz is run by TrustClickz, 615 Green Valley Drive, Moody, AL 35004. This policy says what we collect, why, and who sees it.</p></div>
|
||||
<div class="card"><h2>What we collect</h2><ul><li><b>Your wallet address</b>, which you prove by signing a message (signing costs nothing and moves no money).</li><li><b>Your network username and sponsor</b>, looked up from the network hub. If you sign in through InstantAdPay or LinkSpin, your email is used only to find you on the hub; Viral Banner Blitz does not store it.</li><li><b>Your banners</b>: the image, link and teaser you post, and their place in the loop.</li><li><b>Visit verification</b>: your IP address and browser type, combined into one-way codes, to count each visitor once a day and keep out bots, plus the website a visitor came from (for the traffic-sources leaderboard). Visit records are deleted after 15 days. We do not keep raw IP addresses.</li><li><b>Cookies</b>: a sign-in cookie, and a referral cookie (30 days) that remembers who sent you.</li></ul></div>
|
||||
<div class="card"><h2>One account across the network</h2><p>The Crypto Team Build Network shares one account across its sites through the network hub. The hub keeps your email address, username, wallet and sponsor, and each network site (InstantAdPay, LinkSpin, Downline Banners, Viral Banner Blitz, Stack POL, Earners Corner) asks it who you are, so you have one identity and one sponsor everywhere. Sites only see what they need.</p></div>
|
||||
<div class="card"><h2>What is public</h2><p>Purchases and payments on the blockchain are public and permanent: anyone can see the wallet addresses and amounts, and nobody can delete them. Our live ledger, leaderboards and toasts show your network username or a shortened wallet. When a package is bought or a weekly prize is paid, a message with the username (or a shortened wallet), the amounts and the transaction link is posted to the network's Telegram payments topic.</p></div>
|
||||
<div class="card"><h2>Who else sees it</h2><p>We do not sell your data. We use service providers to run the site (hosting, databases, blockchain connections, and Telegram for the payment messages), and we share data if the law requires it.</p></div>
|
||||
<div class="card"><h2>Your choices</h2><p>You can ask us to delete your account data on this site or on the network hub. Records on the blockchain cannot be deleted by anyone. You can clear the cookies in your browser at any time; you will need to sign in again.</p></div>
|
||||
<div class="card"><h2>Contact</h2><p>Questions, problems or a request about your data: <a href="https://instantadpay.com/support" target="_blank" rel="noopener">network support</a>, or write to TrustClickz, 615 Green Valley Drive, Moody, AL 35004.</p></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=5"></script>
|
||||
<script src="/assets/static.js?v=1"></script>
|
||||
</body>
|
||||
</html>
|
||||
+2
-2
@@ -22,7 +22,7 @@
|
||||
<meta name="theme-color" content="#ffd400">
|
||||
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=DM+Sans:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=5">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=6">
|
||||
<link rel="stylesheet" href="/assets/kit.css?v=1">
|
||||
</head>
|
||||
<body>
|
||||
@@ -34,7 +34,7 @@
|
||||
<div id="status" class="note" hidden></div>
|
||||
<div id="kit"><p class="muted">Loading the kit...</p></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=4"></script>
|
||||
<script src="/assets/common.js?v=5"></script>
|
||||
<script src="/assets/kitpage.js?v=1"></script>
|
||||
<script src="/assets/promote.js?v=1"></script>
|
||||
</body>
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
|
||||
<title>Terms and Conditions | Viral Banner Blitz</title>
|
||||
<meta name="description" content="The terms for using Viral Banner Blitz: what you buy (advertising), how each payment is split on-chain, no refunds, crypto risk and fair use.">
|
||||
<link rel="canonical" href="https://viralbannerblitz.com/terms">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:site_name" content="Viral Banner Blitz">
|
||||
<meta property="og:title" content="Terms and Conditions | Viral Banner Blitz">
|
||||
<meta property="og:description" content="The terms for using Viral Banner Blitz: what you buy (advertising), how each payment is split on-chain, no refunds, crypto risk and fair use.">
|
||||
<meta property="og:url" content="https://viralbannerblitz.com/terms">
|
||||
<meta property="og:image" content="https://viralbannerblitz.com/art/og-share.png">
|
||||
<meta property="og:image:width" content="1200">
|
||||
<meta property="og:image:height" content="630">
|
||||
<meta property="og:image:alt" content="Viral Banner Blitz: a community banner loop that moves with every verified visitor">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="Terms and Conditions | Viral Banner Blitz">
|
||||
<meta name="twitter:description" content="The terms for using Viral Banner Blitz: what you buy (advertising), how each payment is split on-chain, no refunds, crypto risk and fair use.">
|
||||
<meta name="twitter:image" content="https://viralbannerblitz.com/art/og-share.png">
|
||||
|
||||
<meta name="theme-color" content="#ffd400">
|
||||
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=DM+Sans:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=6">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap legal">
|
||||
<section class="hero"><h1>Terms and Conditions</h1><p class="lead">The rules for using Viral Banner Blitz, in plain English.</p><p class="muted small">Last updated November 14, 2026</p></section>
|
||||
<div class="card"><h2>Who we are</h2><p>Viral Banner Blitz (viralbannerblitz.com) is run by TrustClickz, 615 Green Valley Drive, Moody, AL 35004. It is part of the Crypto Team Build Network: one network account works across InstantAdPay, LinkSpin, Downline Banners, Viral Banner Blitz, Stack POL and Earners Corner. By using Viral Banner Blitz you agree to these terms.</p></div>
|
||||
<div class="card"><h2>What Viral Banner Blitz is</h2><p>Viral Banner Blitz is a community loop of 125x125 banners. Verified visitors move the loop, and a banner that rides out of the loop earns network ad views.</p></div>
|
||||
<div class="card"><h2>What you buy</h2><p>Network members (InstantAdPay or LinkSpin) get one free post credit each day they sign in. You can also buy post credit packs and the banner look (a bright border and a teaser line). Prices are on the Packages page.</p><p>Purchases are paid in POL on Polygon at the live Chainlink POL/USD price the contract reads when you buy. Anything you send above the price comes back to you in the same transaction.</p><p>What you buy is advertising for your own banners. It is not income, an investment or a share of anything.</p><p>Every package is a single, one-time purchase. Nothing renews and nothing is ever billed again. There are no subscriptions.</p></div>
|
||||
<div class="card"><h2>How a payment is split</h2><p>The Viral Banner Blitz shop contract splits each purchase in the same transaction it is paid: 30% to the network member who introduced the buyer (no sponsor: Viral Banner Blitz), 10% to the prize wallet for the weekly leaderboard prizes, and 60% to Viral Banner Blitz.</p><p>The split is fixed in the contract code and there is no owner withdraw. The contract keeps nothing: a sponsor payment goes straight to the sponsor's wallet in the buyer's transaction, and there is nothing to withdraw. If a payment cannot be delivered, it waits in the contract for that wallet to claim, and nobody else can take it.</p><p>The 10% prize share is held in the prize wallet until the weekly prizes are paid. Each week the top three on each leaderboard are paid in POL from the prize wallet the following Monday, after an administrator approves the payout. A place nobody qualifies for is not paid and its share stays in the prize wallet for later weeks.</p><p>Your sponsor is set on your first purchase from the network sponsor the network hub knows for your wallet, through a voucher the site signs. Once set on the contract, it never changes.</p></div>
|
||||
<div class="card"><h2>Nothing is promised</h2><p>We do not promise or guarantee any income, payout, prize or result. Read the <a href="/disclaimer">Earnings Disclaimer</a>.</p></div>
|
||||
<div class="card"><h2>No refunds</h2><p>Payments are made on the blockchain and are final once confirmed. We cannot reverse, cancel or refund them. Check the amount and what you are buying before you confirm in your wallet.</p></div>
|
||||
<div class="card"><h2>Crypto risk</h2><ul><li>The price of POL moves. The dollar value of a payment can be higher or lower later than when it was paid.</li><li>You are responsible for your wallet and its recovery phrase. Nobody, including us, can recover a lost wallet or reverse a payment sent from it.</li><li>Blockchain transactions are final. Each one costs a small network fee (gas) in POL, paid to the network, not to us.</li><li>Use SafePal or any other crypto wallet you trust, and never share your recovery phrase with anyone. We will never ask for it.</li></ul></div>
|
||||
<div class="card"><h2>Fair use</h2><p>A verified visitor is a real browser that keeps the loop page open and visible for a few seconds. Each visitor counts once every 24 hours, only a few visitors per internet connection count each day, and bots, crawlers and repeat visits do not count. We may refuse visits we judge not to be real, and may disqualify anyone who fakes traffic from the leaderboards and prizes.</p><p>Your banner must be your own or one you have the right to use, and its link must lead to a lawful page that can be shown in the loop. No adult content, malware, phishing, deceptive offers, hate, or anything illegal where you or your visitors live. We may remove a banner and close an account that breaks these rules; credits already used are not returned.</p><p>Do not try to break, overload or game the site, and do not use more than one account to get extra free credits, views or prizes.</p></div>
|
||||
<div class="card"><h2>Your account</h2><p>You sign in with your wallet or through InstantAdPay or LinkSpin. Your network account, username and sponsor are shared across the network through the network hub, as described in the <a href="/privacy">Privacy Policy</a>. You must be old enough to make a binding agreement where you live, and using crypto must be legal there.</p></div>
|
||||
<div class="card"><h2>The service</h2><p>The site is provided as it is. We work to keep it running but cannot promise it will always be available or free of errors. The smart contract runs on Polygon on its own; its rules are public and can be checked on the <a href="/contract">contract page</a>. We may change features, prices of future purchases or these terms; changes apply from the date they are posted here.</p></div>
|
||||
<div class="card"><h2>Limits</h2><p>As far as the law allows, we are not responsible for losses caused by the blockchain, your wallet, the price of POL, third-party websites in banners, or events outside our control, and our total responsibility to you is limited to what you paid for the purchase in question. These terms are governed by the laws of the State of Alabama, USA.</p></div>
|
||||
<div class="card"><h2>Contact</h2><p>Questions, problems or a request about your data: <a href="https://instantadpay.com/support" target="_blank" rel="noopener">network support</a>, or write to TrustClickz, 615 Green Valley Drive, Moody, AL 35004.</p></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=5"></script>
|
||||
<script src="/assets/static.js?v=1"></script>
|
||||
</body>
|
||||
</html>
|
||||
+47
-1
@@ -5,6 +5,8 @@
|
||||
// prizes: last week's leaderboards (seeded visits) -> prepare -> refuse while the prize wallet is short (says how much) ->
|
||||
// fund it -> approve and pay -> exact POL per winner at the feed price, ties to the earlier, the prize wallet itself
|
||||
// skipped -> a second approval refused -> /api/prizes lists the winners with their transactions.
|
||||
// trust pack (2026-11-14): /api/ledger (each purchase with its real split from the receipt, prize payouts), /api/contract (live
|
||||
// facts), the pages, and a stand-in Telegram API: one photo card per purchase, one line per prize payout, never twice.
|
||||
// node qa/chain.mjs (needs anvil: ~/.foundry/bin/anvil(.exe), and forge build output in ../contracts/out)
|
||||
import { spawn } from 'node:child_process';
|
||||
import fs from 'node:fs';
|
||||
@@ -38,6 +40,11 @@ function ctWeek(ts) { const p = Object.fromEntries(fmt.formatToParts(new Date(ts
|
||||
const THIS_WEEK = ctWeek(Date.now()); const LAST_WEEK = new Date(Date.parse(THIS_WEEK + 'T12:00:00Z') - 7 * 86400000).toISOString().slice(0, 10);
|
||||
const LW_AT = Date.parse(LAST_WEEK + 'T18:00:00Z'); // Monday noon CT of last week
|
||||
|
||||
// ---- stand-in Telegram Bot API (never the real group): records every call ----
|
||||
const TPORT = PORT + 2; const tgCalls = [];
|
||||
require('node:http').createServer(async (q, r) => { let b = ''; for await (const c of q) b += c; let j = {}; try { j = JSON.parse(b || '{}'); } catch (e) {}
|
||||
tgCalls.push({ method: q.url.split('/').pop(), token: q.url.split('/')[1], body: j }); r.setHeader('Content-Type', 'application/json'); r.end(JSON.stringify({ ok: true, result: { message_id: tgCalls.length } })); }).listen(TPORT, '127.0.0.1').unref();
|
||||
|
||||
// ---- stand-in hub: M's network sponsor is S ----
|
||||
const people = new Map(); // wallet -> { id, username, sponsorWallet }
|
||||
const HUB_SECRET = 'c'.repeat(40);
|
||||
@@ -83,7 +90,8 @@ async function main() {
|
||||
const env = Object.assign({}, process.env, { PORT: String(PORT), DATA_DIR: DATA, ADMIN_TOKEN: ADMIN, NODE_ENV: 'development', DOCSTORE_URL: '', LINK_PROBE: '0', NETWORK_LOOKUP_URL: '',
|
||||
CHAIN_ID: '31337', CONTRACT_ADDRESS: SHOP, CHAIN_RPC: RPC, KEEPER_KEY: K[1], SHOP_START_BLOCK: '1', SHOP_CONFIRMATIONS: '0', SHOP_POLL_MS: '300',
|
||||
PRIZE_KEY: P.privateKey, PRIZE_WALLET: P.address, PRIZE_RECEIPT_MS: '300', EXPLORER: 'https://explorer.invalid',
|
||||
HUB_URL: 'http://127.0.0.1:' + HPORT, HUB_SECRET, HUB_SITE: 'vbb', HUB_ENABLED: '0' });
|
||||
HUB_URL: 'http://127.0.0.1:' + HPORT, HUB_SECRET, HUB_SITE: 'vbb', HUB_ENABLED: '0',
|
||||
TG_TOKEN: 'standin-token', TG_CHAT: '-100123', TG_PAY_TOPIC: '632242', TG_API: 'http://127.0.0.1:' + TPORT });
|
||||
const log = fs.openSync(path.join(OUT, 'chain-server.log'), 'w');
|
||||
const srv = spawn(process.execPath, ['server.js'], { cwd: APP, env, stdio: ['ignore', log, log] }); procs.push(srv);
|
||||
for (let i = 0; i < 80; i++) { try { if ((await fetch(BASE + '/health')).ok) break; } catch (e) {} await sleep(150); }
|
||||
@@ -127,6 +135,38 @@ async function main() {
|
||||
ok(look, 'the watcher gives that banner the look');
|
||||
const spl = await call('/api/splash'); ok([...spl.loop, ...spl.queue].some(t => t.id === bid && t.look && t.teaser === 'example-member.com'), 'the loop shows it with the border + teaser');
|
||||
|
||||
console.log('1b. trust pack: ledger, contract, pages, Telegram cards');
|
||||
const share = w => ({ sp: w * 3000n / 10000n, pz: w * 1000n / 10000n, co: w - w * 3000n / 10000n - w * 1000n / 10000n });
|
||||
let led; for (let i = 0; i < 40; i++) { led = await call('/api/ledger?n=50'); const x = (led.items || []).find(y => y.tx === tx.hash.toLowerCase()); if (x && x.pays && x.pays.length === 3 && x.pays[0].role === 'sponsor') break; await sleep(200); }
|
||||
const it1 = (led.items || []).find(x => x.tx === tx.hash.toLowerCase()); const sh = share(wei);
|
||||
ok(it1 && it1.kind === 'purchase' && it1.what === '10 post credits' && it1.usdCents === 300, 'ledger lists the pack purchase', it1);
|
||||
const pz = it1 && Object.fromEntries(it1.pays.map(x => [x.role, x]));
|
||||
ok(pz && pz.sponsor && pz.sponsor.to === S && BigInt(pz.sponsor.wei) === sh.sp && BigInt(pz.prize.wei) === sh.pz && BigInt(pz.company.wei) === sh.co && pz.prize.to === P.address.toLowerCase(),
|
||||
'ledger split from the receipt: 30% to the sponsor, 10% prize wallet, 60% company (exact wei)', it1 && it1.pays);
|
||||
ok(led.totals && led.totals.purchases === 3 && BigInt(led.totals.sponsorWei) === BigInt(led.totals.weiPaid) * 3000n / 10000n, 'ledger totals: 3 purchases (seeded + 2), sponsor POL = 30% of both sponsored purchases', led.totals);
|
||||
ok((led.items || []).some(x => x.kind === 'purchase' && x.what === 'the banner look'), 'ledger names the banner look purchase', led.items && led.items.map(x => x.what));
|
||||
const cf = await call('/api/contract');
|
||||
ok(cf.live === true && cf.owner === deployer.address.toLowerCase() && cf.prizeWallet === P.address.toLowerCase() && cf.company === company.toLowerCase() && cf.keeper === keeper.address.toLowerCase()
|
||||
&& cf.paused === false && cf.orderCount === 2 && cf.balanceWei === '0' && cf.split.sponsorPct === 30 && cf.split.prizePct === 10 && cf.split.companyPct === 60 && cf.verified.sourcify === true,
|
||||
'/api/contract reads the live facts (owner, prize wallet, company, keeper, 2 orders, holds 0)', cf);
|
||||
for (const pg of ['/contract', '/ledger', '/terms', '/disclaimer', '/privacy']) { const r2 = await fetch(BASE + pg); const h = await r2.text();
|
||||
ok(r2.status === 200 && h.includes('common.js?v=5') && !h.includes('—'), pg + ' serves (no em dashes)'); }
|
||||
const legal = (await (await fetch(BASE + '/terms')).text()) + (await (await fetch(BASE + '/disclaimer')).text()) + (await (await fetch(BASE + '/privacy')).text());
|
||||
ok(legal.includes('TrustClickz, 615 Green Valley Drive, Moody, AL 35004') && /ever billed again/.test(legal) && /final once confirmed/.test(legal) && /not an investment/.test(legal) && /network hub/.test(legal) && !/\$50|cap/i.test(legal.replace(/capture|capital|escape/gi, '')),
|
||||
'legal pages: TrustClickz, one-time purchases, no refunds on-chain, not an investment, the hub, no prize cap');
|
||||
const ns = await call('/api/network-sites'); const nl = Object.keys(ns).filter(k => /^\d+$/.test(k)).map(k => ns[k]);
|
||||
ok(nl.length === 6 && nl.map(x => x.name).join(',') === 'InstantAdPay,LinkSpin,Downline Banners,Viral Banner Blitz,Stack POL,Earners Corner', '/api/network-sites: the six network sites (fallback list when the hub has none)', nl.map(x => x.name));
|
||||
let photos = []; for (let i = 0; i < 40; i++) { photos = tgCalls.filter(c => c.method === 'sendPhoto'); if (photos.length >= 2) break; await sleep(200); }
|
||||
const c1 = photos.find(c => String(c.body.caption).includes(tx.hash.toLowerCase()));
|
||||
ok(photos.length === 2 && photos.every(c => c.token === 'botstandin-token' && c.body.chat_id === '-100123' && c.body.message_thread_id === 632242 && c.body.parse_mode === 'HTML' && /\/art\/proof\/vbb-proof-(pink|blue|yellow)\.png$/.test(c.body.photo)),
|
||||
'one Telegram photo card per purchase (2), to the payments topic, with a proof image', photos.map(c => [c.token, c.body.chat_id, c.body.message_thread_id, c.body.photo]));
|
||||
ok(photos.length === 2 && photos[0].body.photo !== photos[1].body.photo, 'the card image rotates between posts');
|
||||
ok(c1 && /@buyerm bought 10 post credits · \$3\.00 \(12\.0000 POL\)/.test(c1.body.caption) && c1.body.caption.includes('Sponsor 30%: 3.6000 POL → @sponsors') && c1.body.caption.includes('Weekly prize pot 10%: 1.2000 POL')
|
||||
&& c1.body.caption.includes('Viral Banner Blitz: 7.2000 POL') && /This week: \d+ purchases?, \$[\d.]+ · prize pot \$[\d.]+/.test(c1.body.caption) && c1.body.caption.includes('https://explorer.invalid/tx/' + tx.hash.toLowerCase()) && !c1.body.caption.includes('—'),
|
||||
'card caption: buyer, sponsor + prize + company split in POL, this week\'s stats, verify link', c1 && c1.body.caption);
|
||||
await call('/api/my/paid', {}); await sleep(1500); // more watcher scans
|
||||
ok(tgCalls.filter(c => c.method === 'sendPhoto').length === 2, 'rescans never post the same purchase twice');
|
||||
|
||||
console.log('2. weekly prize payout (last week: ' + LAST_WEEK + ')');
|
||||
let ap, plan; for (let i = 0; i < 40; i++) { ap = await adm('/api/admin/prizes'); plan = (ap.weeks || []).find(w => w.week === LAST_WEEK); if (plan) break; await sleep(250); }
|
||||
ok(plan && plan.status === 'prepared', 'the app prepared last week by itself', ap.weeks && ap.weeks.map(w => w.week + ':' + w.status));
|
||||
@@ -152,7 +192,13 @@ async function main() {
|
||||
let r = await adm('/api/admin/prizes/prepare', { week: LAST_WEEK }); ok(r.status === 'paid', 'preparing a paid week again changes nothing', r.status);
|
||||
const pub = await call('/api/prizes'); const lw = (pub.past || [])[0];
|
||||
ok(lw && lw.week === LAST_WEEK && lw.winners.length === 6 && lw.winners.every(x => x.tx && x.confirmed && x.pol) && pub.explorer === 'https://explorer.invalid' && !JSON.stringify(pub).includes(P.privateKey.slice(2, 12)), 'public /api/prizes lists the winners with their transactions (never the key)', lw);
|
||||
let lines = []; for (let i = 0; i < 40; i++) { lines = tgCalls.filter(c => c.method === 'sendMessage' && /weekly prize/.test(c.body.text)); if (lines.length >= 6) break; await sleep(200); }
|
||||
ok(lines.length === 6 && lines.every(c => c.body.message_thread_id === 632242 && /POL \(\$\d+\.\d\d\)/.test(c.body.text) && /explorer\.invalid\/tx\/0x[0-9a-f]{64}/.test(c.body.text))
|
||||
&& new Set(lines.map(c => c.body.text.match(/tx\/(0x[0-9a-f]{64})/)[1])).size === 6, 'one Telegram line per confirmed prize payout (6), each with its own transaction', lines.map(c => c.body.text.split('\n')[1]));
|
||||
ok(lines.some(c => c.body.text.includes('@winner1 · 1st place, most verified visitors') && c.body.text.includes('20.0000 POL ($5.00)')), 'prize line names the winner, place, board and amount', lines.map(c => c.body.text.split('\n')[1]));
|
||||
const led2 = await call('/api/ledger?n=50'); ok((led2.items || []).filter(x => x.kind === 'prize' && x.confirmed).length === 6 && led2.totals.prizePayouts === 6, 'the ledger lists the 6 prize payouts with their transactions', led2.totals);
|
||||
const st = await adm('/api/admin/status'); ok(!JSON.stringify(st).includes(P.privateKey.slice(2, 12)) && st.prize && st.prize.keyAddress === P.address.toLowerCase(), 'admin status shows the prize wallet, never its key');
|
||||
ok(st.proof && st.proof.telegram === true && st.proof.posted === 2 && st.proof.prizeLines === 6 && !JSON.stringify(st).includes('standin-token'), 'admin status shows the proof posts, never the bot token', st.proof);
|
||||
|
||||
srv.kill(); an.kill();
|
||||
console.log('\n' + pass + ' passed, ' + fail + ' failed');
|
||||
|
||||
@@ -519,6 +519,21 @@ async function main() {
|
||||
ok((await pg.textContent('#kit')).includes('?ref=smokeleader') && (await pg.inputValue('#whoIn')) === 'smokeleader', name + ': Promote page shows the kit with the member links');
|
||||
ok(!!(await pg.$('nav a[href="/promote"]')), name + ': nav links to Promote');
|
||||
await pg.waitForTimeout(600); await pg.screenshot({ path: path.join(OUT, 'promote-' + name + '.png'), fullPage: true });
|
||||
// trust pack (2026-11-14): footer legal + proof links, company line, network line; ledger + contract + legal pages render
|
||||
await pg.goto(BASE + '/how', { waitUntil: 'domcontentloaded' }); await pg.waitForFunction(() => /Earners Corner/.test((document.querySelector('footer .netline') || {}).textContent || ''), null, { timeout: 6000 }).catch(() => {});
|
||||
const ft = await pg.textContent('footer.foot'); const hrefs = await pg.$$eval('footer.foot a', as => as.map(a => a.getAttribute('href')));
|
||||
ok(['/terms', '/disclaimer', '/privacy', '/contract', '/ledger'].every(h => hrefs.includes(h)) && /Support/.test(ft) && /TrustClickz · 615 Green Valley Drive, Moody, AL 35004/.test(ft)
|
||||
&& /Part of the network · One account across the network: InstantAdPay · LinkSpin · Downline Banners · Viral Banner Blitz · Stack POL · Earners Corner/.test(ft.replace(/\s+/g, ' ')) && !/RM Circle|rmcircle/i.test(ft)
|
||||
&& (await pg.textContent('footer .netline .here')) === 'Viral Banner Blitz', name + ': footer: legal + proof links, company line, network line with VBB as current, never RM Circle', ft.slice(-400));
|
||||
const sw = await pg.evaluate(() => document.documentElement.scrollWidth); ok(sw <= pg.viewportSize().width, name + ': footer fits the screen (no sideways scroll)', sw);
|
||||
await pg.locator('footer.foot').screenshot({ path: path.join(OUT, 'footer-' + name + '.png') });
|
||||
for (const lp of ['/terms', '/disclaimer', '/privacy']) { await pg.goto(BASE + lp, { waitUntil: 'domcontentloaded' }); ok((await pg.textContent('main')).includes('TrustClickz') && !!(await pg.$('footer.foot')), name + ': ' + lp + ' renders with the footer'); }
|
||||
await pg.goto(BASE + '/ledger', { waitUntil: 'domcontentloaded' }); await pg.waitForFunction(() => !/Loading/.test(document.querySelector('#rows tbody').textContent), null, { timeout: 8000 }).catch(() => {});
|
||||
ok(!!(await pg.$('#totals .stat')) && !/Loading/.test(await pg.textContent('#rows')), name + ': /ledger renders its totals and rows', (await pg.textContent('#rows')).slice(0, 200));
|
||||
await pg.screenshot({ path: path.join(OUT, 'ledger-' + name + '.png'), fullPage: true });
|
||||
await pg.goto(BASE + '/contract', { waitUntil: 'domcontentloaded' }); await pg.waitForFunction(() => !/Reading the contract/.test(document.getElementById('facts').textContent), null, { timeout: 8000 }).catch(() => {});
|
||||
ok(!/Reading the contract/.test(await pg.textContent('#facts')) && /30%/.test(await pg.textContent('main')), name + ': /contract renders', (await pg.textContent('#facts')).slice(0, 200));
|
||||
await pg.screenshot({ path: path.join(OUT, 'contract-' + name + '.png'), fullPage: true });
|
||||
await pg.goto(BASE + '/', { waitUntil: 'domcontentloaded' }); await pg.waitForTimeout(300);
|
||||
ok(!(await pg.$('script[src*="linkspin.app/z.js"]')), name + ': no network zone on the loop page');
|
||||
await ctx.close();
|
||||
|
||||
@@ -23,6 +23,8 @@ const shop = require('./shop');
|
||||
const promokit = require('./promokit'); // promo kit feed /api/promo-kit + the /promote page (2026-11-14)
|
||||
const hubreport = require('./hubreport'); // network hub report by wallet (off unless HUB_ENABLED)
|
||||
const prize = require('./prize');
|
||||
const proof = require('./proof'); // trust pack: /ledger, /contract, Telegram card per purchase + line per prize payout (2026-11-14)
|
||||
const netsites = require('./netsites'); // footer network list from the hub (2026-11-14)
|
||||
const lsspins = require('./lsspins'); // LinkSpin Banner Spins: post one as a banner, and fill the splash's open places (2026-11-14)
|
||||
|
||||
const PUB = path.join(__dirname, 'public');
|
||||
@@ -215,7 +217,8 @@ function oldLink(u) {
|
||||
// network ad zone on the 404 page (LinkSpin zone on Marty's account, 300x250; the page zones live in public/assets/common.js ZONES). '' = none
|
||||
const ZONE_404 = '';
|
||||
|
||||
const PAGES = { '/': 'index.html', '/my': 'my.html', '/leaders': 'leaders.html', '/how': 'how.html', '/packages': 'packages.html', '/admin': 'admin.html' };
|
||||
const PAGES = { '/': 'index.html', '/my': 'my.html', '/leaders': 'leaders.html', '/how': 'how.html', '/packages': 'packages.html', '/admin': 'admin.html',
|
||||
'/contract': 'contract.html', '/ledger': 'ledger.html', '/terms': 'terms.html', '/disclaimer': 'disclaimer.html', '/privacy': 'privacy.html' }; // trust pack 2026-11-14
|
||||
const challenges = new Map();
|
||||
const clickSeen = new Map();
|
||||
|
||||
@@ -240,7 +243,7 @@ const server = http.createServer(async (req, res) => {
|
||||
if (/^\/r\/[^/]+$/.test(p)) { res.writeHead(302, { Location: '/?ref=' + encodeURIComponent(decodeURIComponent(p.slice(3))) }); return res.end(); }
|
||||
if (p === '/sitemap.xml') {
|
||||
const day = new Date().toISOString().slice(0, 10);
|
||||
const urls = ['/', '/leaders', '/how', '/packages', '/promote'].map(x => '<url><loc>https://' + C.site + x + '</loc><lastmod>' + day + '</lastmod></url>').join('');
|
||||
const urls = ['/', '/leaders', '/how', '/packages', '/promote', '/contract', '/ledger', '/terms', '/disclaimer', '/privacy'].map(x => '<url><loc>https://' + C.site + x + '</loc><lastmod>' + day + '</lastmod></url>').join('');
|
||||
res.writeHead(200, headers({ 'Content-Type': 'application/xml; charset=utf-8', 'Cache-Control': 'public, max-age=3600' }));
|
||||
return res.end('<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' + urls + '</urlset>');
|
||||
}
|
||||
@@ -288,6 +291,10 @@ const server = http.createServer(async (req, res) => {
|
||||
try { return json(res, 200, await shop.receipt(p.slice(8))); } catch (e) { return json(res, 200, { found: false }); }
|
||||
}
|
||||
// past weeks' prize winners with their transactions (paid weeks only)
|
||||
// trust pack (2026-11-14): the public ledger (purchases with their split, prize payouts), the live contract facts, the network list
|
||||
if (p === '/api/ledger' && req.method === 'GET') return json(res, 200, proof.ledger(u.searchParams.get('n')), { 'Cache-Control': 'public, max-age=10' });
|
||||
if (p === '/api/contract' && req.method === 'GET') { if (limited(req, 'contract', 600, 3600000)) return json(res, 429, { error: 'Too many requests' }); return json(res, 200, await proof.contract(), { 'Cache-Control': 'public, max-age=60' }); }
|
||||
if (p === '/api/network-sites' && req.method === 'GET') return netsites.handle(req, res);
|
||||
if (p === '/api/prizes' && req.method === 'GET') return json(res, 200, { current: prizes(), week: store.ctWeek(), past: prize.history(12), explorer: C.explorer }, { 'Cache-Control': 'public, max-age=30' });
|
||||
if (p === '/api/splash' && req.method === 'GET') { const v = loop.view(24); v.fill = splashFill(); return json(res, 200, v, { 'Cache-Control': 'no-store' }); }
|
||||
if (p === '/api/leaders' && req.method === 'GET') {
|
||||
@@ -466,7 +473,7 @@ const server = http.createServer(async (req, res) => {
|
||||
queue: { length: S.queue.length, next: S.queue.slice(0, 20) }, progress: S.progress, held: S.progress >= C.perShift && !S.queue.length,
|
||||
today: { visits: t.visits || 0, shifts: t.shifts || 0, cycles: t.cycles || 0, posts: t.posts || 0, clicks: t.clicks || 0 },
|
||||
totals: S.totals, ledger: { entries: L.length, views: L.reduce((x, e) => x + e.views, 0), viewsByStatus: byStatus, credited: 0 },
|
||||
members: store.members().length, banners: S.banners.length, visitsKept: store.visits().length, shop: shop.view(), prize: prize.view(), hub: hubreport.view(), hubLookup: hubpeople.view(), lsSpins: lsspins.view(), docstore: docstore.view(), oldrefs: Object.keys(oldRefMap()).length });
|
||||
members: store.members().length, banners: S.banners.length, visitsKept: store.visits().length, shop: shop.view(), prize: prize.view(), proof: proof.view(), hub: hubreport.view(), hubLookup: hubpeople.view(), lsSpins: lsspins.view(), docstore: docstore.view(), oldrefs: Object.keys(oldRefMap()).length });
|
||||
}
|
||||
// old username -> network username map for the old-link redirects: { oldrefs: { old: network } } replaces the whole map
|
||||
if (p === '/api/admin/oldrefs' && req.method === 'POST') {
|
||||
@@ -540,6 +547,8 @@ function saveUpload(owner, buf, ext) {
|
||||
loop.init({ onCycle: (b, e) => console.log('cycle', 'banner #' + b.id, e.views + ' network views recorded') });
|
||||
store.pruneVisits(); loop.rebuildIndex();
|
||||
hubreport.init({ dataDir: C.dataDir, purchases: () => Object.entries((store.state() || {}).purchases || {}).map(([key, x]) => Object.assign({ key }, x)) });
|
||||
proof.init(C, { shop, prize, nameOf: async a => { const m = await netMember({ a }).catch(() => null); return m && m.address === a ? m.username : null; } });
|
||||
shop.setHook(proof.onPurchase); prize.setHook(proof.onPrize); // before the watcher's first scan
|
||||
shop.init(C); // inert without CONTRACT_ADDRESS + CHAIN_RPC (watcher) / KEEPER_KEY (vouchers)
|
||||
prize.init(C); // prepares last week's payout plan; pays only on an admin's approval (PRIZE_KEY)
|
||||
// fill spins: members seen in the last 60 days (most recent 400), one LinkSpin call each every 10 minutes
|
||||
|
||||
@@ -20,6 +20,8 @@ const CALLS = new Interface(['function quoteWei(uint256 sku, uint256 qty) view r
|
||||
const TYPES = { Voucher: [{ name: 'buyer', type: 'address' }, { name: 'sponsor', type: 'address' }, { name: 'deadline', type: 'uint256' }] };
|
||||
const st = { polls: 0, credited: 0, dupes: 0, ignored: 0, errors: 0, lastError: null, head: null };
|
||||
let C = null, keeper = null, busy = false, timer = null;
|
||||
const hooks = { onPurchase: null }; // proof.js: ledger split + Telegram card per newly credited purchase (2026-11-14)
|
||||
function setHook(fn) { hooks.onPurchase = typeof fn === 'function' ? fn : null; }
|
||||
|
||||
function init(cfg) {
|
||||
C = cfg; keeper = null;
|
||||
@@ -53,6 +55,7 @@ function apply(ev) {
|
||||
P[key] = { at: Date.now(), blockAt: ev.blockAt || null, block: ev.block, orderId: ev.orderId, buyer: a, sku: ev.sku, qty: ev.qty, ref: ev.ref, credits: ev.credits, usdCents: ev.usdCents,
|
||||
weiPaid: ev.weiPaid, sponsor: ev.sponsor, sponsorPaid: ev.sponsorPaid, applied };
|
||||
store.save(); st.credited++;
|
||||
if (hooks.onPurchase) { try { hooks.onPurchase(P[key], String(ev.txHash).toLowerCase()); } catch (e) {} }
|
||||
console.log('shop: order', ev.orderId, 'sku', ev.sku, 'x' + ev.qty, a, applied === 'credits' ? '+' + ev.credits + ' credits' : applied);
|
||||
return true;
|
||||
}
|
||||
@@ -146,4 +149,4 @@ function view() {
|
||||
return Object.assign({ contract: C ? C.contractAddress || null : null, watching: watching(), vouchers: voucherOn(), keeper: keeper ? keeper.address : null,
|
||||
lastBlock: ((store.state() || {}).shop || {}).lastBlock ?? null, purchases: list.length, creditsSold: list.reduce((t, x) => t + (x.credits || 0), 0), unmatched: list.filter(x => x.applied === 'unmatched').length }, st);
|
||||
}
|
||||
module.exports = { init, voucher, voucherOn, watching, apply, poll, view, quote, order, receipt, fees, nudge, call, rpc, weekSales, TOPIC, IFACE, TYPES, CALLS };
|
||||
module.exports = { setHook, init, voucher, voucherOn, watching, apply, poll, view, quote, order, receipt, fees, nudge, call, rpc, weekSales, TOPIC, IFACE, TYPES, CALLS };
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
// Telegram proof cards for Viral Banner Blitz (trust pack 2026-11-14): three 1200x630 images in the VBB pop-art look, rotated by
|
||||
// proof.js per purchase post (the live numbers go in the caption). Neutral file names (no "banner"/"ad"/size tokens).
|
||||
// node tools/proof-art.mjs -> public/art/proof/vbb-proof-{pink,blue,yellow}.png
|
||||
import { pathToFileURL } from 'url';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
const PW = process.env.PLAYWRIGHT || 'D:/Projects/MarketingAgent/qa-tester/node_modules/playwright/index.js';
|
||||
const pwm = await import(pathToFileURL(PW).href); const chromium = pwm.chromium || (pwm.default && pwm.default.chromium);
|
||||
const APP = path.resolve(path.dirname(new URL(import.meta.url).pathname.replace(/^\/([A-Z]:)/, '$1')), '..');
|
||||
const OUT = path.join(APP, 'public', 'art', 'proof'); fs.mkdirSync(OUT, { recursive: true });
|
||||
const mark = fs.readFileSync(path.join(APP, 'public', 'art', 'mark.svg'), 'utf8');
|
||||
const V = { pink: ['#ff2d87', '#fff', '#ffd400'], blue: ['#2b59ff', '#fff', '#14d9a0'], yellow: ['#ffd400', '#14121f', '#ff2d87'] };
|
||||
const COLORS = ['#ff2d87', '#2b59ff', '#ffd400', '#14d9a0', '#ffffff', '#ff2d87', '#14d9a0', '#2b59ff', '#ffd400'];
|
||||
const html = ([acc, accInk, acc2]) => `<!doctype html><html><head><meta charset="utf-8">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=DM+Sans:wght@500;700&family=Space+Mono:wght@700&display=swap">
|
||||
<style>
|
||||
*{box-sizing:border-box;margin:0;padding:0} html,body{width:1200px;height:630px;overflow:hidden}
|
||||
body{font-family:"DM Sans",sans-serif;color:#14121f;background:#fff4dc;position:relative;
|
||||
background-image:radial-gradient(rgba(255,45,135,.18) 1.4px,transparent 1.6px),radial-gradient(rgba(43,89,255,.13) 1.4px,transparent 1.6px);background-size:22px 22px,22px 22px;background-position:0 0,11px 11px}
|
||||
body::after{content:"";position:absolute;inset:0;border:6px solid #14121f}
|
||||
.top{position:absolute;left:56px;top:46px;display:flex;align-items:center;gap:14px}
|
||||
.top .m{width:62px;height:62px} .top .m svg{width:100%;height:100%}
|
||||
.wm{font:800 34px "Bricolage Grotesque";letter-spacing:-.03em} .wm b{color:#ff2d87;-webkit-text-stroke:1px #14121f}
|
||||
.eb{position:absolute;left:56px;top:142px;font:700 18px "Space Mono";letter-spacing:.1em;text-transform:uppercase;background:#14d9a0;border:3px solid #14121f;border-radius:999px;padding:9px 18px;box-shadow:4px 4px 0 #14121f;transform:rotate(-1.5deg)}
|
||||
h1{position:absolute;left:56px;top:205px;width:700px;font:800 82px/0.98 "Bricolage Grotesque";letter-spacing:-.035em}
|
||||
h1 em{font-style:normal;color:${acc};-webkit-text-stroke:2px #14121f;text-shadow:5px 5px 0 ${acc2}}
|
||||
.split{position:absolute;left:56px;bottom:62px;display:flex;gap:14px}
|
||||
.split span{font:800 24px "Bricolage Grotesque";border:3px solid #14121f;border-radius:14px;padding:12px 18px;box-shadow:5px 5px 0 #14121f;background:#fff}
|
||||
.split span:nth-child(1){background:${acc};color:${accInk}} .split span:nth-child(2){background:#dbe4ff} .split span:nth-child(3){background:#c9f7e6}
|
||||
.tiles{position:absolute;right:58px;top:118px;display:grid;grid-template-columns:repeat(3,112px);gap:16px}
|
||||
.tiles i{display:block;width:112px;height:112px;border:3.5px solid #14121f;border-radius:14px;box-shadow:6px 6px 0 #14121f}
|
||||
.url{position:absolute;right:58px;bottom:62px;font:700 20px "Space Mono";background:#14121f;color:#fff;border-radius:10px;padding:10px 14px}
|
||||
</style></head><body>
|
||||
<div class="top"><div class="m">${mark}</div><span class="wm">Viral Banner <b>Blitz</b></span></div>
|
||||
<span class="eb">New purchase · paid on-chain</span>
|
||||
<h1>Split in the <em>same transaction.</em></h1>
|
||||
<div class="split"><span>30% sponsor</span><span>10% weekly prizes</span><span>60% VBB</span></div>
|
||||
<div class="tiles">${COLORS.map((c, i) => `<i style="background:${c};transform:rotate(${((i * 37) % 7) - 3}deg)"></i>`).join('')}</div>
|
||||
<span class="url">viralbannerblitz.com/ledger</span>
|
||||
</body></html>`;
|
||||
const b = await chromium.launch(); const pg = await b.newPage({ viewport: { width: 1200, height: 630 } });
|
||||
for (const [k, v] of Object.entries(V)) {
|
||||
await pg.setContent(html(v), { waitUntil: 'networkidle' }); await pg.evaluate(() => document.fonts.ready);
|
||||
const f = path.join(OUT, 'vbb-proof-' + k + '.png'); await pg.screenshot({ path: f }); console.log('wrote', f, fs.statSync(f).size);
|
||||
}
|
||||
await b.close();
|
||||
Reference in New Issue
Block a user