Compare commits
2 Commits
e3b2c7b579
...
ba5cdfdf4b
| Author | SHA1 | Date | |
|---|---|---|---|
| ba5cdfdf4b | |||
| a32c1ab3c9 |
@@ -138,6 +138,7 @@
|
||||
|
||||
<footer>
|
||||
<div>InstantAdPay · <a href="/">how it works</a> · <a href="/ledger">live ledger</a></div>
|
||||
<div class="small">InstantAdPay is the Polygon hub of the <a href="https://cryptoteambuild.com" target="_blank" rel="noopener">Crypto Team Build Network</a>.</div>
|
||||
<div class="small">Advertising services with a performance referral program. Not an investment product; no income guarantees. Crypto transactions are irreversible. Never spend what you cannot afford.</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
<p class="muted small" style="margin-top:30px">No income is guaranteed. Results depend on your effort. Cryptocurrency involves risk of loss. InstantAdPay sells advertising; it is not an investment.</p>
|
||||
<footer>
|
||||
<div>InstantAdPay · <a href="/my#earn">Earn credits</a> · <a href="/my#campaigns">Campaigns</a> · <a href="/my#training">back to Training</a></div>
|
||||
<div class="small">InstantAdPay is the Polygon hub of the <a href="https://cryptoteambuild.com" target="_blank" rel="noopener">Crypto Team Build Network</a>.</div>
|
||||
<div class="small">Advertising services with a performance referral program. Not an investment product; no income guarantees.</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
<p class="muted small" style="margin-top:10px">No income is guaranteed. Results depend on your effort. Cryptocurrency involves risk of loss. InstantAdPay sells advertising; it is not an investment product.</p>
|
||||
<footer>
|
||||
<div>InstantAdPay · <a href="/">Home</a> · <a href="/ledger">Live ledger</a> · <a href="/earning">How earning works</a></div>
|
||||
<div class="small">InstantAdPay is the Polygon hub of the <a href="https://cryptoteambuild.com" target="_blank" rel="noopener">Crypto Team Build Network</a>.</div>
|
||||
<div class="small">Advertising services with a performance referral program. Not an investment product; no income guarantees.</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
@@ -491,6 +491,7 @@
|
||||
|
||||
<footer>
|
||||
<div>InstantAdPay · every payment verifiable on-chain · <a href="/ledger">live ledger</a> · <a id="contractLink" href="#" target="_blank" rel="noopener">view the contract ↗</a></div>
|
||||
<div class="small">InstantAdPay is the Polygon hub of the <a href="https://cryptoteambuild.com" target="_blank" rel="noopener">Crypto Team Build Network</a>.</div>
|
||||
<div class="small">Advertising services with a performance referral program. Not an investment product; no income guarantees. Crypto transactions are irreversible. Never spend what you cannot afford.</div>
|
||||
<div class="ghost" aria-hidden="true">InstantAdPay</div>
|
||||
</footer>
|
||||
|
||||
@@ -101,6 +101,7 @@
|
||||
|
||||
<footer>
|
||||
<div>InstantAdPay · <a href="/my#training">back to Training</a> · <a href="/plays">team-building plays</a> · <a href="/wallets">wallets and buying POL</a></div>
|
||||
<div class="small">InstantAdPay is the Polygon hub of the <a href="https://cryptoteambuild.com" target="_blank" rel="noopener">Crypto Team Build Network</a>.</div>
|
||||
<div class="small">Advertising services with a performance referral program. Not an investment product; no income guarantees.</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<div class="card small" id="adSlotText" hidden></div>
|
||||
<footer>
|
||||
<div>InstantAdPay · <a href="/">how it works</a> · <a id="contractLink" href="#" target="_blank" rel="noopener">contract source ↗</a></div>
|
||||
<div class="small">InstantAdPay is the Polygon hub of the <a href="https://cryptoteambuild.com" target="_blank" rel="noopener">Crypto Team Build Network</a>.</div>
|
||||
</footer>
|
||||
</div>
|
||||
<script src="/assets/common.js?v=20261003fr2"></script><script src="/assets/welcome.js?v=20260923b"></script>
|
||||
|
||||
+2
-1
@@ -1036,7 +1036,7 @@
|
||||
</div>
|
||||
|
||||
<div class="pane" id="pane-games" hidden>
|
||||
<div class="card"><h3>Games</h3><p class="muted small">Games across the network that pay in POL to the wallet on your InstantAdPay account. One tap signs you in.</p></div>
|
||||
<div class="card"><h3>Games</h3><p class="muted small">Games in the InstantAdPay network, the Polygon wing of the <a href="https://cryptoteambuild.com" target="_blank" rel="noopener">Crypto Team Build Network</a>. They pay in POL to the wallet on your InstantAdPay account, and one tap signs you in.</p></div>
|
||||
<div class="games-grid" id="gamesGrid"><p class="muted small">Loading games…</p></div>
|
||||
<style>.games-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px;margin-top:4px}
|
||||
.game-card{background:var(--panel-solid);border:1px solid var(--line-strong);border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column}
|
||||
@@ -1105,6 +1105,7 @@
|
||||
<a href="/">Ad packages</a>
|
||||
<a href="/ledger">Live ledger</a>
|
||||
<a href="/contract">The contract</a>
|
||||
<a href="https://cryptoteambuild.com" target="_blank" rel="noopener">Crypto Team Build Network</a>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -189,6 +189,7 @@
|
||||
|
||||
<footer>
|
||||
<div>InstantAdPay · <a href="/my#training">back to Training</a> · <a href="/ledger">live ledger</a></div>
|
||||
<div class="small">InstantAdPay is the Polygon hub of the <a href="https://cryptoteambuild.com" target="_blank" rel="noopener">Crypto Team Build Network</a>.</div>
|
||||
<div class="small">Advertising services with a performance referral program. Not an investment product; no income guarantees. Crypto transactions are irreversible. Never spend what you cannot afford.</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
@@ -118,6 +118,7 @@
|
||||
|
||||
<footer>
|
||||
<div>InstantAdPay · <a href="/my#training">back to Training</a> · <a href="/my#buy">Buy packages</a> · <a href="/my#wallet">Wallet</a></div>
|
||||
<div class="small">InstantAdPay is the Polygon hub of the <a href="https://cryptoteambuild.com" target="_blank" rel="noopener">Crypto Team Build Network</a>.</div>
|
||||
<div class="small">Advertising services with a performance referral program. Not an investment product; no income guarantees. Crypto transactions are irreversible. Never share your recovery phrase.</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
<p class="muted small" style="margin-top:10px">No income is guaranteed. Results depend on your effort. Cryptocurrency involves risk of loss. InstantAdPay sells advertising; it is not an investment product.</p>
|
||||
<footer>
|
||||
<div>InstantAdPay · <a href="/">Home</a> · <a href="/friday">Five Dollar Friday</a> · <a href="/ledger">Live ledger</a> · <a href="/earning">How earning works</a></div>
|
||||
<div class="small">InstantAdPay is the Polygon hub of the <a href="https://cryptoteambuild.com" target="_blank" rel="noopener">Crypto Team Build Network</a>.</div>
|
||||
<div class="small">Advertising services with a performance referral program. Not an investment product; no income guarantees.</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
@@ -1353,6 +1353,7 @@ function pwOpen(token) {
|
||||
const pwPasses = persistedMap('pwpasses'); // email -> { n, earned, used, log: [{ at, d, why }] }
|
||||
const pwPassN = e => ((pwPasses.get(e) || {}).n || 0);
|
||||
function pwPassAdd(e, d, why) { const c = pwPasses.get(e) || { n: 0, earned: 0, used: 0, log: [] }; const v = { n: Math.max(0, c.n + d), earned: c.earned + Math.max(0, d), used: c.used + Math.max(0, -d), log: [{ at: Date.now(), d, why }].concat(c.log || []).slice(0, 50) }; pwPasses.set(e, v); return v.n; }
|
||||
const pwPrizes = persistedMap('pwprizes'); // 'YYYY-MM-DD:place' -> { email, credits, at }
|
||||
const pwOrders = persistedMap('pworders'); // order -> { status: 'waiting'|'paid', email, serial, ret, cb, ts, tx, cents, delivered }
|
||||
const pwIsGameUrl = x => [PW_URL()].concat(PW_ALT()).some(o => String(x || '').startsWith(o + '/'));
|
||||
async function pwCallback(cbUrl, receipt) {
|
||||
@@ -2888,6 +2889,23 @@ const server = http.createServer(async (req, res) => {
|
||||
res.writeHead(302, { Location: DR_URL() + '/auth?t=' + tok, 'Cache-Control': 'no-store', 'Set-Cookie': 'iap.return=; Path=/; SameSite=Lax; Max-Age=0' + (IS_PROD ? '; Secure' : '') }); return res.end();
|
||||
}
|
||||
// -- PolyWarriors hand-off (2026-10-05): sign the member across; the game verifies with PW_SSO_SECRET
|
||||
// PolyWarriors weekly member-fight season prizes (Marty 2026-10-05): the game signs one claim per week and place; InstantAdPay
|
||||
// decides the amount (setting pwWeeklyPrize, default '1000,500,250' earned credits) and pays each week+place once.
|
||||
if (p === '/api/game/pw/prize' && req.method === 'POST') {
|
||||
const b = await readBody(req); const r = pwOpen(b.t);
|
||||
if (r.error) return json(res, 400, { error: r.error });
|
||||
const c = r.claims, place = Number(c.place), week = String(c.week || '');
|
||||
if (c.kind !== 'pw-prize' || !(place >= 1 && place <= 3) || !/^\d{4}-\d{2}-\d{2}$/.test(week) || !c.email) return json(res, 400, { error: 'bad claim' });
|
||||
if (Math.abs(Date.now() - new Date(week + 'T12:00:00Z').getTime()) > 14 * 86400000) return json(res, 400, { error: 'stale week' });
|
||||
const k = week + ':' + place; if (pwPrizes.get(k)) return json(res, 200, { ok: true, already: true });
|
||||
const acct = await accounts.byEmail(String(c.email).toLowerCase()); if (!acct) return json(res, 404, { error: 'no account' });
|
||||
const amts = String(siteConfig().pwWeeklyPrize || '1000,500,250').split(',').map(x => Math.max(0, Math.round(Number(x) || 0)));
|
||||
const credits = Math.min(amts[place - 1] || 0, 5000); if (!credits) return json(res, 200, { ok: true, credits: 0 });
|
||||
pwPrizes.set(k, { email: acct.email, credits, at: Date.now() });
|
||||
await ads.addEarned(acct.email, credits, { log: { kind: 'bonus', note: 'PolyWarriors weekly season: #' + place + ' (week of ' + week + ')', ref: 'pwprize:' + k } });
|
||||
console.log('polywarriors weekly prize', k, acct.email, credits);
|
||||
return json(res, 200, { ok: true, credits });
|
||||
}
|
||||
if (p === '/api/my/polywarriors' && req.method === 'GET') {
|
||||
const s = await auth.fromRequest(req);
|
||||
if (!s || !s.email) { res.writeHead(302, { Location: '/my' + refQ(u), 'Set-Cookie': gkCookie('iap.return', 'polywarriors', 1800), 'Cache-Control': 'no-store' }); return res.end(); }
|
||||
|
||||
Reference in New Issue
Block a user