Compare commits
11 Commits
281e134a15
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| d915884409 | |||
| a71d8ea276 | |||
| 5e8c903b63 | |||
| 654cd7b408 | |||
| 408a30cf31 | |||
| 3709d91f59 | |||
| 6599c2f4ec | |||
| 94a414cc1c | |||
| ab57b4089e | |||
| 4c0aa35e6c | |||
| 395ed1fac1 |
@@ -11,7 +11,7 @@
|
||||
{ "q": "What should you never share with anyone?", "options": ["Your Secret Recovery Phrase", "Your invite link", "Your member ID", "Your wallet address"], "fact": "Video 2: Never share your Secret Recovery Phrase with anyone." },
|
||||
{ "q": "Which wallet does the training show you how to set up?", "options": ["MetaMask", "PayPal", "Cash App", "A bank account"], "fact": "Video 2: Create your MetaMask wallet." },
|
||||
{ "q": "Which network do you fund your wallet on?", "options": ["Polygon Mainnet", "Bitcoin", "Solana", "Dogecoin"], "fact": "Video 3: Get POL onto Polygon Mainnet." },
|
||||
{ "q": "For someone brand new to crypto, which service does the page name for buying POL with a card?", "options": ["MoonPay", "Venmo", "Western Union", "Zelle"], "fact": "The simplest path is MoonPay." },
|
||||
{ "q": "When you buy POL with a card, which address do you send it to?", "options": ["Your own wallet address", "Your sponsor's address", "The site's address", "Any address works"], "fact": "Paste your own wallet address as the destination." },
|
||||
{ "q": "According to Video 7, what does every level you own do?", "options": ["Extends your reach one generation deeper", "Doubles every payment", "Removes the need for directs", "Nothing, levels are cosmetic"], "fact": "Every level you own extends your reach exactly one generation deeper." }
|
||||
]},
|
||||
{ "mission": "ctb-programs", "url": "https://ctbrewards.saasy.top/", "name": "CTB Rewards", "questions": [
|
||||
|
||||
@@ -102,14 +102,14 @@
|
||||
{
|
||||
"id": "rmc-training-4",
|
||||
"missionId": "rmc-training",
|
||||
"q": "For someone brand new to crypto, which service does the page name for buying POL with a card?",
|
||||
"q": "When you buy POL with a card, which address do you send it to?",
|
||||
"options": [
|
||||
"MoonPay",
|
||||
"Venmo",
|
||||
"Western Union",
|
||||
"Zelle"
|
||||
"Your own wallet address",
|
||||
"Your sponsor's address",
|
||||
"The site's address",
|
||||
"Any address works"
|
||||
],
|
||||
"fact": "The simplest path is MoonPay.",
|
||||
"fact": "Paste your own wallet address as the destination.",
|
||||
"active": true,
|
||||
"added": "2026-09-26"
|
||||
},
|
||||
|
||||
+10
-5
@@ -89,13 +89,16 @@ const closed = b => !!b && (b.status === 'won' || b.status === 'missed');
|
||||
function putBox(b) { store.update('boxes', {}, all => { all[b.id] = b; return all; }); return b; }
|
||||
function patchBox(id, patch) { let out = null; store.update('boxes', {}, all => { if (all[id]) { Object.assign(all[id], patch); out = all[id]; } return all; }); return out; }
|
||||
|
||||
function earned(me) { const s = settings(); return s.on && rewards.findsToday(me.memberId, ctDay()) >= s.base; }
|
||||
// The box is a Game Pass perk since 2026-11-02 (Marty: the Pass is the purchase that funds the game): a free account hunts
|
||||
// once a day and never reaches the box; pass = false answers 'pass' on the board and refuses to open.
|
||||
function earned(me, pass) { const s = settings(); return s.on && pass !== false && rewards.findsToday(me.memberId, ctDay()) >= s.base; }
|
||||
|
||||
// what the board shows
|
||||
function view(me) {
|
||||
function view(me, pass) {
|
||||
const s = settings(); if (!s.on) return { on: false };
|
||||
const day = ctDay(); const b = getBox(me.memberId, day);
|
||||
const done = rewards.findsToday(me.memberId, day);
|
||||
if (!b && pass === false) return { on: true, status: 'pass', need: s.base, done: Math.min(done, s.base), pol: s.pol };
|
||||
if (!b) return { on: true, status: done >= s.base ? 'ready' : 'locked', need: s.base, done: Math.min(done, s.base), pol: s.pol };
|
||||
const m = missions.get(b.missionId) || {}; const q = bank().find(x => x.id === b.qid);
|
||||
const out = { on: true, status: b.status, pol: b.pol, site: m.site || b.missionId, name: m.name || '', dwell: m.dwell || 30, url: b.url || null, expires: b.exp || null };
|
||||
@@ -108,11 +111,13 @@ function view(me) {
|
||||
}
|
||||
|
||||
// pass = the Game Pass perk (GAME-PASS.md 4): a second case a day once the first is closed; the first case stays the rule for everyone else
|
||||
function open(me, pass) {
|
||||
if (!earned(me)) return { error: 'Finish today’s Code Hunts first. The box unlocks when your last one is found.' };
|
||||
// pass = the second-case perk; allowed = may a box open at all (the full tier: Game Pass holders, or everyone while GAMEPASS is off)
|
||||
function open(me, pass, allowed) {
|
||||
const day = ctDay(); const cur = getBox(me.memberId, day);
|
||||
const second = !!(pass && cur && closed(cur) && !/:2$/.test(cur.id));
|
||||
if (cur && !second) return { ok: true, box: cur };
|
||||
if (cur && !second) return { ok: true, box: cur }; // a box already open today stays reachable (a pass that lapsed mid-day)
|
||||
if (allowed === false) return { error: 'The Mystery Hunt Box opens for Game Pass holders.' };
|
||||
if (!earned(me, true)) return { error: 'Finish today’s Code Hunts first. The box unlocks when your last one is found.' };
|
||||
const c = pickCase(me.memberId, day); if (!c) return { error: 'No cases are open right now. Check back tomorrow.' };
|
||||
let made = null;
|
||||
// idempotent per member per day: a double tap or two tabs can never mint a second box
|
||||
|
||||
+15
-6
@@ -29,8 +29,15 @@ function connect() {
|
||||
wallet = new ethers.Wallet(process.env.HUNT_WALLET_KEY.trim(), provider);
|
||||
}
|
||||
// a node hiccup is not a failed drip: 5xx, timeouts, connection resets, rate limits, missing responses
|
||||
const TRANSIENT = /socket hang up|ECONNABORTED|EPIPE|EHOSTUNREACH|ENETUNREACH|network error|fetch failed|UND_ERR|other side closed|server response 5\d\d|timeout|ETIMEDOUT|ECONNRESET|ECONNREFUSED|EAI_AGAIN|429|rate limit|missing response|could not detect network|bad response|SERVER_ERROR|NETWORK_ERROR/i; // + connection-level failures (PolHunter #7, 2026-10-09)
|
||||
const TRANSIENT = /socket hang up|ECONNABORTED|EPIPE|EHOSTUNREACH|ENETUNREACH|network error|fetch failed|UND_ERR|other side closed|server response 5\d\d|timeout|ETIMEDOUT|ECONNRESET|ECONNREFUSED|EAI_AGAIN|429|rate limit|missing response|could not detect network|bad response|SERVER_ERROR|NETWORK_ERROR|403|Forbidden|401|Unauthorized/i; // + connection-level failures (PolHunter #7, 2026-10-09)
|
||||
function rotate(reason) { if (rpcs.length > 1) { rpcAt = (rpcAt + 1) % rpcs.length; connect(); console.warn('faucet: RPC rotated to', rpcs[rpcAt % rpcs.length], 'after', reason.slice(0, 80)); } }
|
||||
// Nonce (2026-11-09, after Turkey Drop's week prizes collided with "replacement fee too low"): publicnode is a load-balanced pool, so
|
||||
// asking it for the next nonce right after a confirmed send can return the SAME nonce again. Sends read the nonce once per tick, keep
|
||||
// the highest one ever used in faucet-state.nextNonce, and count up locally. A nonce clash is a retry (row back to due), never a failure.
|
||||
const NONCE_ERR = /replacement fee too low|replacement transaction underpriced|nonce too low|nonce has already been used|already known|NONCE_EXPIRED|REPLACEMENT_UNDERPRICED/i;
|
||||
async function nextNonce() { const n = await provider.getTransactionCount(wallet.address, 'pending'); return Math.max(n, Number(store.read('faucet-state', {}).nextNonce) || 0); }
|
||||
const keepNonce = n => store.update('faucet-state', {}, x => Object.assign(x, { nextNonce: Math.max(n, Number(x.nextNonce) || 0) }));
|
||||
const DROP_MS = 10 * 60000; // a "sent" row whose tx no node knows after this long was dropped: back to due (its nonce slot is reused, so it can never pay twice)
|
||||
function address() { return wallet ? wallet.address : null; }
|
||||
async function balance() { if (!provider || !wallet) return null; const b = await provider.getBalance(wallet.address); return Number(ethers.formatEther(b)); }
|
||||
|
||||
@@ -50,7 +57,7 @@ async function tick(notify) {
|
||||
// drips sent but never settled here (a restart mid-wait, a receipt that lagged past the wait):
|
||||
// ask the chain, never re-send
|
||||
for (const p of store.read('payouts', []).filter(x => x.status === 'sent' && x.tx)) {
|
||||
try { const rc = await provider.getTransactionReceipt(p.tx); if (rc && (await settle(p, rc, notify))) paid++; } catch (e) {}
|
||||
try { const rc = await provider.getTransactionReceipt(p.tx); if (rc) { if (await settle(p, rc, notify)) paid++; } else if (Date.now() - (p.sentAt || p.ts || 0) > DROP_MS && !(await provider.getTransaction(p.tx))) rewards.mark(p.id, { status: 'due', tx: null, error: 'dropped ' + String(p.tx).slice(0, 12) + ', resending' }); } catch (e) { if (TRANSIENT.test(String(e.message || e))) { rotate(String(e.message || e)); break; } } // a node refusing us (403) must not freeze the check
|
||||
}
|
||||
const due = rewards.payable();
|
||||
// a dry faucet is not a failed drip: check the balance first, leave the drips due, alert once
|
||||
@@ -59,18 +66,20 @@ async function tick(notify) {
|
||||
const need = due.reduce((n, p) => n + p.pol, 0) + 0.01;
|
||||
if (bal0 < due[0].pol + 0.005) { if (notify) { const st = store.read('faucet-state', {}); const day = new Date().toLocaleDateString('en-CA', { timeZone: 'America/Chicago' }); if (st.dryAlertDay !== day) { st.dryAlertDay = day; store.write('faucet-state', st); await notify('low', { balance: bal0, threshold: need, address: wallet.address }); } } ticking = false; return { paid: 0, waiting: due.length, balance: bal0 }; }
|
||||
}
|
||||
let nonce = null; if (due.length) { try { nonce = await nextNonce(); } catch (e) { if (TRANSIENT.test(String(e.message || e))) rotate(String(e.message || e)); return { paid }; } }
|
||||
for (const p of due) {
|
||||
if (bal0 != null && bal0 < p.pol + 0.005) break; // pay what the balance covers, leave the rest due
|
||||
if (!p.wallet || !/^0x[a-f0-9]{40}$/i.test(p.wallet)) { rewards.mark(p.id, { status: 'failed', error: 'no wallet on the account' }); continue; }
|
||||
try {
|
||||
const tx = await wallet.sendTransaction({ to: p.wallet, value: ethers.parseEther(String(p.pol)) });
|
||||
rewards.mark(p.id, { status: 'sent', tx: tx.hash });
|
||||
const tx = await wallet.sendTransaction({ to: p.wallet, value: ethers.parseEther(String(p.pol)), nonce });
|
||||
rewards.mark(p.id, { status: 'sent', tx: tx.hash, sentAt: Date.now() }); nonce++; keepNonce(nonce);
|
||||
let rc = null;
|
||||
try { rc = await tx.wait(1, 90000); } catch (e) { if (e && e.code === 'TIMEOUT') continue; throw e; } // still pending: stays 'sent', settled next tick
|
||||
if (await settle(Object.assign({}, p, { tx: tx.hash }), rc, notify)) { paid++; if (bal0 != null) bal0 -= p.pol; }
|
||||
} catch (e) {
|
||||
const msg = String(e.message || e);
|
||||
if (/insufficient funds/i.test(msg)) { rewards.mark(p.id, { status: 'due', error: null }); break; } // dry: leave it due, stop this pass
|
||||
if (/insufficient funds/i.test(msg)) { rewards.mark(p.id, { status: 'due', error: null }); break; }
|
||||
if (NONCE_ERR.test(msg) || NONCE_ERR.test(String(e && e.code))) { rewards.mark(p.id, { status: 'due', error: 'nonce clash, retrying' }); try { keepNonce(await provider.getTransactionCount(wallet.address, 'latest')); } catch (x) {} break; } // dry: leave it due, stop this pass
|
||||
// the send itself failed only if no hash was recorded; a hash means the chain has it, leave it 'sent'
|
||||
const cur = store.read('payouts', []).find(x => x.id === p.id);
|
||||
if (cur && cur.status === 'sent' && cur.tx) continue;
|
||||
@@ -99,7 +108,7 @@ async function send(to, pol, onHash) {
|
||||
if (!to || !/^0x[a-f0-9]{40}$/i.test(to)) throw new Error('bad wallet');
|
||||
if (!(Number(pol) > 0)) throw new Error('bad amount');
|
||||
try {
|
||||
const tx = await wallet.sendTransaction({ to, value: ethers.parseEther(String(pol)) });
|
||||
const nonce = await nextNonce(); const tx = await wallet.sendTransaction({ to, value: ethers.parseEther(String(pol)), nonce }); keepNonce(nonce + 1);
|
||||
if (onHash) { try { await onHash(tx.hash); } catch (e) {} }
|
||||
let rc = null; try { rc = await tx.wait(1, 90000); } catch (e) { if (e && e.code === 'TIMEOUT') return { tx: tx.hash, pending: true }; throw e; }
|
||||
return { tx: tx.hash, ok: !!(rc && rc.status === 1) };
|
||||
|
||||
+2
-1
@@ -21,7 +21,8 @@ const TTL = 3 * 60 * 1000;
|
||||
|
||||
function fetchJson(url) {
|
||||
return new Promise((resolve) => {
|
||||
const rq = https.get(url, { timeout: 8000 }, r => {
|
||||
// plain http only for a local stub InstantAdPay (tests)
|
||||
const rq = (String(url).startsWith('http:') ? require('http') : https).get(url, { timeout: 8000 }, r => {
|
||||
let raw = ''; r.setEncoding('utf8'); r.on('data', d => { raw += d; });
|
||||
r.on('end', () => { try { resolve(r.statusCode === 200 ? JSON.parse(raw) : null); } catch (e) { resolve(null); } });
|
||||
});
|
||||
|
||||
+33
-4
@@ -48,7 +48,7 @@ async function get(path, who, params) {
|
||||
return { status: r.status, json };
|
||||
}
|
||||
|
||||
// the one call that matters -> { allowed, deferred, carried, pass, day, capHit, enforced, repeat, retry: false }
|
||||
// the one call that matters -> { allowed, deferred, carried, pass, day, capHit, enforced, repeat, lifetimeHit, freeLifetime, waiting, retry: false }
|
||||
// or { allowed: 0, retry: true, error }. Never throws.
|
||||
async function grant({ memberId, email, game, kind, pol, ref }) {
|
||||
const body = { memberId: Number(memberId) || 0, email: String(email || '').trim().toLowerCase() || undefined, game: game || cfg.game, kind: kind === 'daily' ? 'daily' : 'progress', pol: r4(Math.max(0, Number(pol) || 0)), ref: String(ref || '') };
|
||||
@@ -57,8 +57,10 @@ async function grant({ memberId, email, game, kind, pol, ref }) {
|
||||
try {
|
||||
const { status, json } = await post('/api/partner/polgrant', body);
|
||||
if (status !== 200 || !json || typeof json.allowed !== 'number') return { allowed: 0, deferred: 0, carried: 0, pass: false, retry: true, error: 'http ' + status + (json && json.error ? ': ' + json.error : '') };
|
||||
const out = { allowed: r4(Math.max(0, json.allowed)), deferred: r4(Math.max(0, Number(json.deferred) || 0)), carried: r4(Math.max(0, Number(json.carried) || 0)), pass: !!(json.pass && (json.pass === true || json.pass.active)), day: json.day || ctDay(), capHit: json.capHit || null, enforced: json.enforced !== false, repeat: !!json.repeat, suspended: !!json.suspended, retry: false };
|
||||
rememberPass(body.memberId, body.email, json.pass, json.passUntil || (json.pass && json.pass.until));
|
||||
const out = { allowed: r4(Math.max(0, json.allowed)), deferred: r4(Math.max(0, Number(json.deferred) || 0)), carried: r4(Math.max(0, Number(json.carried) || 0)), pass: !!(json.pass && (json.pass === true || json.pass.active)), day: json.day || ctDay(), capHit: json.capHit || null, enforced: json.enforced !== false, repeat: !!json.repeat, suspended: !!json.suspended, lifetimeHit: !!json.lifetimeHit, freeLifetime: Number(json.freeLifetime) || 0, waiting: r4(Math.max(0, Number(json.waiting) || 0)), retry: false };
|
||||
// a REPEATED ref answers with the pass state of the day it was first granted (IAP gamepass.grant prev.pass), which can be weeks
|
||||
// old: never let that overwrite what we know now (2026-11-23, @bizventures recorded as no pass while holding one)
|
||||
if (!json.repeat) rememberPass(body.memberId, body.email, json.pass, json.passUntil || (json.pass && json.pass.until));
|
||||
return out;
|
||||
} catch (e) { return { allowed: 0, deferred: 0, carried: 0, pass: false, retry: true, error: String(e && e.message || e).slice(0, 120) }; }
|
||||
}
|
||||
@@ -92,6 +94,18 @@ async function fetchPass(memberId, email) {
|
||||
return passOf(memberId, email);
|
||||
} catch (e) { return cur; }
|
||||
}
|
||||
// ask InstantAdPay NOW, whatever the stored copy says (the weekly prize run, 2026-11-23): { ok, active }. ok false = IAP did not
|
||||
// answer, so the caller must wait and ask again, never decide on the stored copy.
|
||||
async function freshPass(memberId, email) {
|
||||
const who = whoOf(memberId, email); if (!ready() || !who) return { ok: false, active: false };
|
||||
try {
|
||||
const { status, json } = await get('/api/partner/player', who, { m: Number(memberId) || 0, e: String(email || '').toLowerCase() });
|
||||
if (status === 404) { rememberPass(memberId, email, false); return { ok: true, active: false }; }
|
||||
if (status !== 200 || !json || json.pass == null) return { ok: false, active: false };
|
||||
rememberPass(memberId, email, json.pass, json.pass && json.pass.until);
|
||||
return { ok: true, active: passOf(memberId, email).active };
|
||||
} catch (e) { return { ok: false, active: false }; }
|
||||
}
|
||||
// what the lobby shows: { on, active, until, untilText, url }
|
||||
function view(memberId, email) {
|
||||
const p = whoOf(memberId, email) ? passOf(memberId, email) : { active: false, until: null };
|
||||
@@ -103,6 +117,12 @@ function note(resp, kind, nominal) {
|
||||
nominal = r4(nominal);
|
||||
if (!resp) return null;
|
||||
if (resp.retry) return 'Your reward is recorded and pays as soon as InstantAdPay confirms it.';
|
||||
// the free allowance is used up (Marty 2026-11-03): only the Game Pass pays from here, so say so, and what is waiting for them
|
||||
if (resp.lifetimeHit && !resp.pass) {
|
||||
const cap = resp.freeLifetime ? r4(resp.freeLifetime) + ' POL' : 'POL';
|
||||
const wait = kind === 'progress' && resp.waiting > 0 ? ' Your ' + r4(resp.waiting) + ' POL earned since is saved and pays out with the Pass.' : '';
|
||||
return 'You have used your free ' + cap + ' in the games. Get the Game Pass to keep earning.' + wait;
|
||||
}
|
||||
if (kind === 'progress' && resp.deferred > 0) return resp.deferred + ' POL is yours; it pays out over the next days (daily cap).';
|
||||
if (kind === 'daily' && resp.allowed + 1e-9 < nominal) return resp.pass ? 'Daily cap reached for today.' : 'Daily cap reached for today. Get the Pass for a higher cap.';
|
||||
return null;
|
||||
@@ -157,4 +177,13 @@ async function tournamentPaid(row, tx) {
|
||||
catch (e) { return { ok: false, error: String(e && e.message || e).slice(0, 120) }; }
|
||||
}
|
||||
|
||||
module.exports = { use, on, whoOf, grant, voidGrant, passOf, rememberPass, fetchPass, view, note, enqueue, queue, queued, dequeue, retry, startRetry, stopRetry, tournamentPending, tournamentPaid, PASS_URL, RETRY_MS, GIVE_UP_MS, ctDay, r4, _cfg: () => cfg };
|
||||
// ad credits for a player (PolHunter tour stops, 2026-11-17; other games may use it later): IAP grants earned-grade credits
|
||||
// with a credit-activity line, once per ref (a retry answers repeat: true). -> { ok, credits, repeat } or { ok: false, error }. Never throws.
|
||||
async function credits({ memberId, email, credits: n, ref, note }) {
|
||||
const body = { memberId: Number(memberId) || 0, email: String(email || '').trim().toLowerCase() || undefined, credits: Math.max(0, Math.round(Number(n) || 0)), ref: String(ref || ''), note: String(note || '').slice(0, 120) };
|
||||
if (!whoOf(body.memberId, body.email) || !body.ref || !body.credits) return { ok: false, error: 'bad request' };
|
||||
if (!ready()) return { ok: false, error: 'polgrant not configured' };
|
||||
try { const { status, json } = await post('/api/partner/credits', body); if (status === 200 && json && json.ok) return { ok: true, credits: Number(json.credits) || 0, repeat: !!json.repeat }; return { ok: false, error: 'http ' + status + (json && json.error ? ': ' + json.error : '') }; }
|
||||
catch (e) { return { ok: false, error: String(e && e.message || e).slice(0, 120) }; }
|
||||
}
|
||||
module.exports = { use, on, whoOf, grant, voidGrant, credits, passOf, rememberPass, fetchPass, freshPass, view, note, enqueue, queue, queued, dequeue, retry, startRetry, stopRetry, tournamentPending, tournamentPaid, PASS_URL, RETRY_MS, GIVE_UP_MS, ctDay, r4, _cfg: () => cfg };
|
||||
|
||||
+8
-4
@@ -18,7 +18,10 @@ const { ctDay } = require('./missions');
|
||||
// drawSkew k: log-uniform on u^(1/k), so k=1 is the plain log-uniform and k=3 leans hard to the floor
|
||||
// (mean ~0.13 POL on 0.05..1, one drip in eighty above 0.5). missionsPerDay: finds per hunter per
|
||||
// Central day (Marty, 2026-09-20: cap 40, k=3, 3 a day, so a launch morning does not empty the pool)
|
||||
const DEFAULTS = { minPol: 0.05, maxPol: 1, dailyCapPol: 20, lowBalancePol: 40, drawSkew: 3, missionsPerDay: 3 };
|
||||
const DEFAULTS = { minPol: 0.05, maxPol: 1, dailyCapPol: 20, lowBalancePol: 40, drawSkew: 3, missionsPerDay: 3,
|
||||
// the free tier (Marty 2026-11-02, every game must fund itself): a free account gets freeMissionsPerDay hunts drawn on
|
||||
// freeMinPol..freeMaxPol; the full allotment and the full draw are for Game Pass holders (the Pass is the purchase)
|
||||
freeMissionsPerDay: 1, freeMinPol: 0.02, freeMaxPol: 0.1 };
|
||||
function settings() { return Object.assign({}, DEFAULTS, store.read('settings', {})); }
|
||||
function setSettings(patch) { return store.update('settings', {}, s => Object.assign(s, patch)); }
|
||||
|
||||
@@ -36,7 +39,7 @@ function draw(min, max, skew) {
|
||||
// returned 0 for everyone, which would read as "no finds yet" to any new caller
|
||||
function findsToday(memberId, day) { const d = day || ctDay(); return store.read('payouts', []).filter(p => p.memberId === Number(memberId) && p.day === d && p.status !== 'failed' && !p.prize && !p.ref && !p.detective).length; }
|
||||
// passExtra: the Game Pass perk, +2 missions a day while the member's pass is active (GAME-PASS.md 4: 3 -> 5); 0 otherwise
|
||||
function daily(memberId, doneIds, bonus, passExtra) { const s = settings(); const base = Math.max(1, Number(s.missionsPerDay) || 3);
|
||||
function daily(memberId, doneIds, bonus, passExtra, pass) { const s = settings(); const base = pass ? Math.max(1, Number(s.missionsPerDay) || 3) : Math.max(1, Number(s.freeMissionsPerDay) || 1); // free tier since 2026-11-02
|
||||
// every live paid mission this hunter has not done yet adds one, because the company is not
|
||||
// funding that completion
|
||||
let extra = 0; try { extra = require('./paid').extraAllowance(doneIds); } catch (e) {}
|
||||
@@ -44,7 +47,8 @@ function daily(memberId, doneIds, bonus, passExtra) { const s = settings(); cons
|
||||
const fb = Math.max(0, Number(bonus) || 0), pe = Math.max(0, Number(passExtra) || 0);
|
||||
const limit = base + extra + fb + pe; const done = findsToday(memberId, ctDay()); return { limit, done, left: Math.max(0, limit - done), base, friday: fb, pass: pe }; }
|
||||
// the nominal amount a completion of `mission` would pay (the Game Pass asks InstantAdPay about it before grant() records it)
|
||||
function quote(mission) { const s = settings(); return mission.paid ? Math.round(Number(mission.hunterPol || 0) * 10000) / 10000 : draw(Number(s.minPol), Number(s.maxPol)); }
|
||||
function quote(mission, pass) { const s = settings(); if (mission.paid) return Math.round(Number(mission.hunterPol || 0) * 10000) / 10000; // an advertiser-funded find pays what the advertiser set, every tier
|
||||
return pass ? draw(Number(s.minPol), Number(s.maxPol)) : draw(Number(s.freeMinPol), Number(s.freeMaxPol)); } // the free draw since 2026-11-02
|
||||
// What the COMPANY has spent today. Advertiser-funded completions are excluded on purpose: the
|
||||
// hunter is paid out of what the advertiser already put in the faucet, so counting it here would
|
||||
// let a paid mission use up the house budget (Marty, 2026-09-24).
|
||||
@@ -74,7 +78,7 @@ function grant(member, mission, opts) {
|
||||
// An advertiser-funded mission pays exactly what the advertiser set, every time. No draw, so
|
||||
// the reserve taken at purchase is exact and can never come up short.
|
||||
const isPaid = !!mission.paid;
|
||||
const pol = opts.pol != null ? Math.round(Number(opts.pol) * 10000) / 10000 : quote(mission);
|
||||
const pol = opts.pol != null ? Math.round(Number(opts.pol) * 10000) / 10000 : quote(mission, !!opts.pass);
|
||||
const day = ctDay();
|
||||
const budgetLeft = mission.budget ? mission.budget - store.read('payouts', []).filter(p => p.missionId === mission.id && p.status !== 'failed').length : Infinity;
|
||||
if (budgetLeft <= 0) return { error: 'This mission has paid out all it was funded for.' };
|
||||
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
// The Network Tour (Marty 2026-11-17): mission rotation per hunter, and the free tier's tour stops.
|
||||
//
|
||||
// Measured 11-03 to 11-17: hunters repeated favorites (old sites 57-73 finds each, the rebuilt network sites 0-6).
|
||||
// So each hunter works through ROUNDS. A round = every active house mission (advertiser-paid missions are extra
|
||||
// allowance and stay outside the round). The board offers only the missions this hunter has not found in the
|
||||
// current round; once every one is found, the round closes and a new one starts. Never-visited missions sort
|
||||
// first, then the least recently found. A mission added mid-round joins the current round as not found; a paused
|
||||
// one is skipped and never blocks a round. Daily limits, draws, the pool and the tiers are untouched.
|
||||
//
|
||||
// State per member, on the volume (rotation.json): { start, rounds, closed: [ts...] }. `start` = the round began
|
||||
// after this instant; finds (member id OR wallet, the same rule as doneToday) at or after it count to the round.
|
||||
// Everyone starts at start 0, so a hunter's first round is their whole history: the sites they never visited are
|
||||
// exactly what is left, which is the point.
|
||||
//
|
||||
// Tour stops (free tier, Marty 2026-11-17): a free member (no active Game Pass, GAMEPASS on) is paid POL only for
|
||||
// DISCOVERY, a find on a house mission they have never found before. A repeat find is a "tour stop": it counts as
|
||||
// their hunt for the day, for the round and for the Full Network Tour badge, pays no POL, and grants a few
|
||||
// InstantAdPay ad credits (settings tourStopCredits / tourStopCreditsDailyMax) through a signed call. A new
|
||||
// mission pays POL again on each free member's first find of it. Game Pass holders are unchanged.
|
||||
'use strict';
|
||||
const store = require('./store');
|
||||
const missions = require('./missions');
|
||||
|
||||
const DEFAULTS = { rotationOn: 1, tourStopCredits: 10, tourStopCreditsDailyMax: 10 };
|
||||
function cfg() { const s = Object.assign({}, DEFAULTS, store.read('settings', {})); return { on: !!Number(s.rotationOn), credits: Math.max(0, Math.round(Number(s.tourStopCredits) || 0)), dailyMax: Math.max(0, Math.round(Number(s.tourStopCreditsDailyMax) || 0)) }; }
|
||||
|
||||
// the missions that make up a round: active house missions (paid ones are extra allowance, not part of the tour)
|
||||
function roundMissions() { return missions.list().filter(m => m.active && !m.paid); }
|
||||
// a hunter's house finds, all time, oldest first: non-failed, not prizes / referral drips / detective cases / paid missions
|
||||
function findsOf(memberId, wallet) {
|
||||
const w = wallet ? String(wallet).toLowerCase() : null; const id = Number(memberId);
|
||||
return store.read('payouts', []).filter(p => p.status !== 'failed' && !p.prize && !p.ref && !p.detective && !p.paid && (p.memberId === id || (w && p.wallet && String(p.wallet).toLowerCase() === w)))
|
||||
.sort((a, b) => (a.at || 0) - (b.at || 0));
|
||||
}
|
||||
// has this hunter ever found this mission (all time)? the discovery test
|
||||
function everFound(memberId, wallet, missionId) { return findsOf(memberId, wallet).some(p => p.missionId === missionId); }
|
||||
|
||||
// the round as it stands; closes any finished round on the way (persisted), so every caller sees the same thing
|
||||
function state(me) {
|
||||
const key = String(Number(me.memberId)); const finds = findsOf(me.memberId, me.wallet);
|
||||
const all = store.read('rotation', {}); let st = Object.assign({ start: 0, rounds: 0, closed: [] }, all[key] || {}); let changed = false;
|
||||
const round = roundMissions(); const ids = new Set(round.map(m => m.id));
|
||||
for (let guard = 0; guard < 100 && ids.size; guard++) {
|
||||
const got = new Set(); let closeAt = null;
|
||||
for (const p of finds) { if ((p.at || 0) < st.start || !ids.has(p.missionId)) continue; got.add(p.missionId); if (got.size === ids.size) { closeAt = p.at || 0; break; } }
|
||||
if (closeAt == null) break;
|
||||
st = { start: closeAt + 1, rounds: st.rounds + 1, closed: st.closed.concat([closeAt]).slice(-50) }; changed = true;
|
||||
}
|
||||
if (changed) store.update('rotation', {}, a => { a[key] = st; return a; });
|
||||
const done = new Set(finds.filter(p => (p.at || 0) >= st.start && ids.has(p.missionId)).map(p => p.missionId));
|
||||
const last = new Map(); for (const p of finds) last.set(p.missionId, p.at || 0); // last find per mission, all time
|
||||
const left = round.filter(m => !done.has(m.id));
|
||||
const toured = round.length > 0 && round.every(m => last.has(m.id)); // every active house mission found at least once, ever
|
||||
return { on: cfg().on, round: st.rounds + 1, rounds: st.rounds, total: round.length, done: round.length - left.length, doneIds: done, left, last, toured, start: st.start };
|
||||
}
|
||||
const rounds = memberId => { const st = store.read('rotation', {})[String(Number(memberId))]; return st ? Number(st.rounds) || 0 : 0; };
|
||||
|
||||
// the board's order: missions open this round (or every mission with rotation off), never-visited first, then the
|
||||
// least recently found; the member's daily shuffle (forMember) breaks ties. Paid missions keep their place in the mix.
|
||||
function order(me, st) {
|
||||
st = st || state(me); const base = missions.forMember(me.memberId);
|
||||
const open = st.on ? base.filter(m => m.paid || !st.doneIds.has(m.id)) : base;
|
||||
const rank = m => st.last.has(m.id) ? st.last.get(m.id) + 1 : 0; // 0 = never found, sorts first
|
||||
return open.map((m, i) => ({ m, i, r: rank(m) })).sort((a, b) => a.r - b.r || a.i - b.i).map(x => x.m);
|
||||
}
|
||||
// may this hunter start this mission? (rotation on: not if it was found earlier in this round; paid missions always)
|
||||
function blocked(me, m, st) { st = st || state(me); return !!(st.on && !m.paid && st.doneIds.has(m.id)); }
|
||||
|
||||
// ---- tour stops --------------------------------------------------------------------------------------------------
|
||||
// credits already granted (or owed) to this member today for tour stops
|
||||
function creditsToday(memberId) { const day = missions.ctDay(); return store.read('payouts', []).filter(p => p.memberId === Number(memberId) && p.day === day && p.tourStop).reduce((n, p) => n + (Number(p.tourStop.credits) || 0), 0); }
|
||||
// a free member's repeat find: the payout row (pol 0, status 'tour') carrying the credits to deliver
|
||||
function tourStop(me, m) {
|
||||
const c = cfg(); const credits = Math.max(0, Math.min(c.credits, c.dailyMax - creditsToday(me.memberId)));
|
||||
const rec = { id: Date.now().toString(36) + Math.random().toString(36).slice(2, 8), memberId: Number(me.memberId), email: me.email, wallet: me.wallet, username: me.username || null,
|
||||
missionId: m.id, site: m.site, pol: 0, day: missions.ctDay(), at: Date.now(), status: 'tour', tx: null, paidAt: null, error: null,
|
||||
tourStop: { credits, state: credits > 0 ? 'due' : 'none', tries: 0, sentAt: null } };
|
||||
store.update('payouts', [], all => { all.push(rec); return all; });
|
||||
return rec;
|
||||
}
|
||||
function markStop(id, patch) { let row = null; store.update('payouts', [], all => { const p = all.find(x => x.id === id); if (p && p.tourStop) { Object.assign(p.tourStop, patch); row = p; } return all; }); return row; }
|
||||
// deliver one stop's credits through InstantAdPay (polgrant.credits, signed, idempotent on ref 'tour:<row id>')
|
||||
async function deliver(row, gp) {
|
||||
if (!row || !row.tourStop || row.tourStop.state !== 'due' || !gp || !gp.credits) return null;
|
||||
const r = await gp.credits({ memberId: row.memberId, email: row.email, credits: row.tourStop.credits, ref: 'tour:' + row.id, note: 'PolHunter tour stop: ' + row.site });
|
||||
if (r && r.ok) return markStop(row.id, { state: 'sent', sentAt: Date.now(), granted: r.credits != null ? r.credits : row.tourStop.credits, error: null });
|
||||
return markStop(row.id, { tries: (row.tourStop.tries || 0) + 1, error: String((r && r.error) || 'no answer').slice(0, 120) }); // stays 'due' (owed): the tick retries
|
||||
}
|
||||
// the 2-minute tick: owed credits go out (a stop stays owed until InstantAdPay confirms it)
|
||||
async function retryDue(gp) { let n = 0; for (const p of store.read('payouts', []).filter(x => x.tourStop && x.tourStop.state === 'due').slice(0, 20)) { const r = await deliver(p, gp); if (r && r.tourStop.state === 'sent') n++; } return n; }
|
||||
|
||||
// admin: round stats per hunter (anyone with a house find)
|
||||
function adminView() {
|
||||
const seen = new Map(); for (const p of store.read('payouts', [])) if (!p.prize && !p.ref && !p.detective && !p.paid && p.status !== 'failed') seen.set(p.memberId, { memberId: p.memberId, wallet: p.wallet || (seen.get(p.memberId) || {}).wallet, who: p.username ? '@' + p.username : '#' + p.memberId });
|
||||
const rows = [...seen.values()].map(h => { const s = state(h); return { memberId: h.memberId, who: h.who, round: s.round, rounds: s.rounds, done: s.done, total: s.total, toured: s.toured, left: s.left.map(m => m.site), lastFind: s.last.size ? Math.max(...s.last.values()) : null }; });
|
||||
rows.sort((a, b) => b.rounds - a.rounds || b.done - a.done);
|
||||
const stops = store.read('payouts', []).filter(p => p.tourStop);
|
||||
return { settings: cfg(), hunters: rows, tourStops: { total: stops.length, sent: stops.filter(p => p.tourStop.state === 'sent').length, owed: stops.filter(p => p.tourStop.state === 'due').length, creditsSent: stops.filter(p => p.tourStop.state === 'sent').reduce((n, p) => n + (Number(p.tourStop.granted) || 0), 0), creditsOwed: stops.filter(p => p.tourStop.state === 'due').reduce((n, p) => n + (Number(p.tourStop.credits) || 0), 0) } };
|
||||
}
|
||||
|
||||
module.exports = { DEFAULTS, cfg, roundMissions, findsOf, everFound, state, rounds, order, blocked, creditsToday, tourStop, deliver, retryDue, markStop, adminView };
|
||||
+47
-5
@@ -15,7 +15,7 @@ const BADGES = [
|
||||
{ id: 'first', name: 'First Find', icon: '\u{1F3AF}', why: 'your first code claimed' },
|
||||
{ id: 'hunter', name: 'Hunter', icon: '\u{1F9ED}', why: 'five finds' },
|
||||
{ id: 'tracker', name: 'Tracker', icon: '\u{1F526}', why: 'twenty finds' },
|
||||
{ id: 'sweep', name: 'Full Sweep', icon: '\u{1F5FA}️', why: 'a find on every site' },
|
||||
{ id: 'sweep', name: 'Full Network Tour',icon: '\u{1F5FA}️', why: 'a find on every site in one round of the network tour' }, // renamed 2026-11-17 (the art still reads FULL SWEEP; only the title changed)
|
||||
{ id: 'lucky', name: 'Lucky Find', icon: '\u{1F48E}', why: 'one drip of 0.4 POL or more' },
|
||||
{ id: 'streak', name: 'On a Streak', icon: '\u{1F525}', why: 'finds on three days in a row' },
|
||||
{ id: 'top', name: 'Top Hunter', icon: '\u{1F3C6}', why: 'won a weekly prize as #1' },
|
||||
@@ -60,7 +60,8 @@ function badgesFor(memberId, list) {
|
||||
if (mine.length >= 5) out.add('hunter');
|
||||
if (mine.length >= 20) out.add('tracker');
|
||||
const sites = new Set(missions.list().filter(m => m.active !== false).map(m => m.site));
|
||||
if (sites.size && [...sites].every(s => mine.some(p => p.site === s))) out.add('sweep');
|
||||
if (sites.size && [...sites].every(s => mine.some(p => p.site === s))) out.add('sweep'); // the original rule, so nobody loses it
|
||||
try { if (require('./rotation').rounds(memberId) >= 1) out.add('sweep'); } catch (e) {} // a closed round of the Network Tour (once per round, count on the card)
|
||||
if (mine.some(p => p.pol >= 0.4)) out.add('lucky');
|
||||
const days = new Set(mine.map(p => p.day));
|
||||
for (const d of days) { if (days.has(dayMinus(d, 1)) && days.has(dayMinus(d, 2))) { out.add('streak'); break; } }
|
||||
@@ -101,7 +102,10 @@ function awardWeek(monday) {
|
||||
const done = store.read('prizes', []);
|
||||
if (done.some(x => x.week === monday)) return { skipped: 'already awarded', week: monday };
|
||||
const rules = prizeRules();
|
||||
const winners = weekRows(monday).filter(r => r.finds >= rules.minFinds).slice(0, rules.pol.length).map((r, i) => Object.assign({ rank: i + 1, prizePol: rules.pol[i] }, r));
|
||||
// weekly prizes are for Game Pass holders (Marty 2026-11-02: the Pass is the purchase that funds the game; confirmed 2026-11-23, with
|
||||
// the leaderboard page now saying so in plain words); with GAMEPASS off, everyone qualifies as before
|
||||
let passOk = () => true; try { const gp = require('./polgrant'); if (gp.on && gp.on()) passOk = r => { try { return !!gp.passOf(r.memberId, r.email).active; } catch (e) { return false; } }; } catch (e) {}
|
||||
const winners = weekRows(monday).filter(r => r.finds >= rules.minFinds && passOk(r)).slice(0, rules.pol.length).map((r, i) => Object.assign({ rank: i + 1, prizePol: rules.pol[i] }, r));
|
||||
const day = ctDay(), at = Date.now();
|
||||
const recs = winners.map(w => ({ id: 'prize' + monday.replace(/-/g, '') + '-' + w.rank, memberId: w.memberId, email: w.email, wallet: w.wallet, username: w.username, missionId: 'prize:' + monday, site: 'Weekly prize #' + w.rank, pol: w.prizePol, day, at, status: 'due', tx: null, paidAt: null, error: null, prize: { week: monday, rank: w.rank } }));
|
||||
if (recs.length) store.update('payouts', [], all => { all.push(...recs); return all; });
|
||||
@@ -109,9 +113,47 @@ function awardWeek(monday) {
|
||||
store.update('prizes', [], all => { all.push(entry); return all; });
|
||||
return entry;
|
||||
}
|
||||
// ONE-TIME catch-up for a week that was already awarded (Marty 2026-11-23: the week of 11-16 paid only the one Pass holder while the
|
||||
// leaderboard page did not say a Pass was needed, so he paid places 2 and 3 once). It ignores the Pass on purpose: the top hunters
|
||||
// by finds are picked again, and anyone in that list who was not paid for the week gets the prize of their place. Nobody already
|
||||
// paid is touched, nothing is paid twice (a payout row for that member and week blocks it), and a second call adds nothing.
|
||||
function awardFill(monday) {
|
||||
if (!/^\d{4}-\d{2}-\d{2}$/.test(monday || '') || weekOf(monday) !== monday) return { error: 'not a Monday key' };
|
||||
const done = store.read('prizes', []), cur = done.find(x => x.week === monday);
|
||||
if (!cur) return { error: 'that week has not been awarded yet' };
|
||||
const rules = prizeRules(), paidTo = new Set(store.read('payouts', []).filter(p => p.prize && p.prize.week === monday).map(p => p.memberId));
|
||||
const top = weekRows(monday).filter(r => r.finds >= rules.minFinds).slice(0, rules.pol.length).map((r, i) => Object.assign({ rank: i + 1, prizePol: rules.pol[i] }, r));
|
||||
const add = top.filter(w => !paidTo.has(w.memberId));
|
||||
if (!add.length) return { week: monday, winners: [], filled: 0 };
|
||||
const day = ctDay(), at = Date.now();
|
||||
const recs = add.map(w => ({ id: 'prize' + monday.replace(/-/g, '') + '-f' + w.rank, memberId: w.memberId, email: w.email, wallet: w.wallet, username: w.username, missionId: 'prize:' + monday, site: 'Weekly prize #' + w.rank, pol: w.prizePol, day, at, status: 'due', tx: null, paidAt: null, error: null, prize: { week: monday, rank: w.rank, fill: true } }));
|
||||
store.update('payouts', [], all => { all.push(...recs); return all; });
|
||||
const added = add.map(w => ({ rank: w.rank, memberId: w.memberId, who: w.who, finds: w.finds, pol: w.pol, prizePol: w.prizePol }));
|
||||
store.update('prizes', [], all => { const e = all.find(x => x.week === monday); if (e) { e.winners = e.winners.concat(added).sort((a, b) => a.rank - b.rank); e.filledAt = at; } return all; });
|
||||
return { week: monday, winners: added, filled: added.length };
|
||||
}
|
||||
// on every tick: the most recent completed week gets awarded on the first tick after it ends
|
||||
function awardDue(notify) {
|
||||
// 2026-11-23: before the award, every hunter who could win (minimum finds reached) has their Game Pass asked fresh from InstantAdPay,
|
||||
// because awardWeek reads the stored copy and a stale "no pass" cost @bizventures 2nd place. If InstantAdPay does not answer for any
|
||||
// of them, nothing is awarded on this tick and the next tick (2 minutes) tries again.
|
||||
let awarding = false;
|
||||
async function awardDue(notify) {
|
||||
const last = dayMinus(weekOf(ctDay()), 7);
|
||||
if (awarding || store.read('prizes', []).some(x => x.week === last)) return null;
|
||||
awarding = true;
|
||||
try {
|
||||
let gp = null; try { gp = require('./polgrant'); } catch (e) {}
|
||||
if (gp && gp.on && gp.on() && gp.freshPass) {
|
||||
const rules = prizeRules();
|
||||
for (const r of weekRows(last).filter(x => x.finds >= rules.minFinds)) {
|
||||
const f = await gp.freshPass(r.memberId, r.email);
|
||||
if (!f.ok) { console.warn('prizes: pass check did not answer for', r.who, '- award waits for the next tick'); return null; }
|
||||
}
|
||||
}
|
||||
return awardNow(last, notify);
|
||||
} finally { awarding = false; }
|
||||
}
|
||||
function awardNow(last, notify) {
|
||||
if (store.read('prizes', []).some(x => x.week === last)) return null;
|
||||
const r = awardWeek(last);
|
||||
if (r && r.winners && r.winners.length && notify) notify('prize', r).catch(() => {});
|
||||
@@ -136,4 +178,4 @@ function memberByName(who) {
|
||||
}
|
||||
function shareLink(site, me) { const ref = me.username || me.memberId; return site + '/?r=' + encodeURIComponent(String(ref)); }
|
||||
|
||||
module.exports = { BADGES, badgesFor, leaderboard, rankOf, shareLink, weekOf, weekRows, awardWeek, awardDue, prizes, prizeRules, nameOf, memberByName };
|
||||
module.exports = { BADGES, badgesFor, leaderboard, rankOf, shareLink, weekOf, weekRows, awardWeek, awardFill, awardDue, prizes, prizeRules, nameOf, memberByName };
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
"scripts": {
|
||||
"start": "node server.js",
|
||||
"dev": "node --watch server.js",
|
||||
"test": "node test/gamepass.js && node test/run.js"
|
||||
"test": "node test/gamepass.js && node test/run.js && node test/rotation.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20"
|
||||
|
||||
+14
-1
@@ -31,6 +31,11 @@
|
||||
<div style="margin-top:12px"><button class="btn sm" id="saveMission">Save mission</button> <span id="missionMsg" style="font-size:13px;color:var(--muted)"></span></div></div>
|
||||
<table id="missions" style="margin-top:14px"></table>
|
||||
</section>
|
||||
<section class="section"><h2>Network Tour</h2>
|
||||
<div class="sub" id="tourLine"></div>
|
||||
<div class="card"><div class="two"><div><label>Rotation (1 = on, 0 = off)</label><input id="rotationOn"></div><div><label>Tour stop ad credits (free tier repeat)</label><input id="tourStopCredits"></div><div><label>Tour stop credits, daily max per member</label><input id="tourStopCreditsDailyMax"></div></div><div style="margin-top:12px"><button class="btn sm" id="saveTour">Save tour settings</button></div></div>
|
||||
<table id="tourRows" style="margin-top:10px"></table>
|
||||
</section>
|
||||
<section class="section"><h2>Ad Detective</h2>
|
||||
<div class="sub" id="detLine"></div>
|
||||
<table id="detQs" style="margin-top:10px"></table>
|
||||
@@ -63,7 +68,15 @@
|
||||
$('detQs').innerHTML = '<tr><th>site</th><th>question</th><th>right answer</th><th>asked</th><th>right</th><th></th></tr>' + d.questions.map(q => '<tr style="' + (q.active === false ? 'opacity:.45' : '') + '"><td class="num">' + esc(q.missionId) + '</td><td>' + esc(q.q) + '</td><td>' + esc(q.options[0]) + '</td><td class="num">' + q.asked + '</td><td class="num">' + (q.asked ? Math.round(100 * q.correct / q.asked) + '%' : '—') + '</td><td><button class="btn ghost sm" data-qa="' + esc(q.id) + '" data-on="' + (q.active === false ? '1' : '0') + '">' + (q.active === false ? 'restore' : 'retire') + '</button></td></tr>').join('');
|
||||
document.querySelectorAll('[data-qa]').forEach(b => b.addEventListener('click', async () => { await api('/api/admin/detective/question', { method: 'POST', body: JSON.stringify({ id: b.dataset.qa, active: b.dataset.on === '1' }) }); loadDetective(); }));
|
||||
}
|
||||
$('go').addEventListener('click', () => { KEY = $('key').value.trim(); load(); loadDetective(); });
|
||||
// the Network Tour (2026-11-17): rounds per hunter, where each one stands this round, tour-stop credits sent and owed
|
||||
async function loadTour() {
|
||||
const t = await api('/api/admin/rotation'); if (!t || !t.hunters) return;
|
||||
for (const k of ['rotationOn', 'tourStopCredits', 'tourStopCreditsDailyMax']) $(k).value = k === 'rotationOn' ? (t.settings.on ? 1 : 0) : (k === 'tourStopCredits' ? t.settings.credits : t.settings.dailyMax);
|
||||
const ts = t.tourStops; $('tourLine').textContent = 'Rotation ' + (t.settings.on ? 'ON' : 'OFF') + ' · ' + t.hunters.length + ' hunters · ' + t.hunters.filter(h => h.rounds > 0).length + ' finished a round · tour stops ' + ts.total + ' (' + ts.creditsSent + ' credits sent, ' + ts.creditsOwed + ' owed)';
|
||||
$('tourRows').innerHTML = '<tr><th>hunter</th><th>rounds done</th><th>this round</th><th>toured all</th><th>left this round</th><th>last find</th></tr>' + t.hunters.map(h => '<tr><td>' + esc(h.who) + '</td><td class="num">' + h.rounds + '</td><td class="num">' + h.done + ' / ' + h.total + '</td><td>' + (h.toured ? 'yes' : '') + '</td><td style="font-size:12px">' + esc(h.left.join(', ')) + '</td><td>' + (h.lastFind ? new Date(h.lastFind).toLocaleString('en-US', { timeZone: 'America/Chicago' }) : '') + '</td></tr>').join('');
|
||||
}
|
||||
$('saveTour').addEventListener('click', async () => { const b = {}; for (const k of ['rotationOn', 'tourStopCredits', 'tourStopCreditsDailyMax']) b[k] = Number($(k).value); const r = await api('/api/admin/settings', { method: 'POST', body: JSON.stringify(b) }); if (r.error) alert(r.error); loadTour(); });
|
||||
$('go').addEventListener('click', () => { KEY = $('key').value.trim(); load(); loadDetective(); loadTour(); });
|
||||
$('key').addEventListener('keydown', e => { if (e.key === 'Enter') $('go').click(); });
|
||||
$('saveSettings').addEventListener('click', async () => { const b = {}; for (const k of ['minPol', 'maxPol', 'dailyCapPol', 'lowBalancePol']) b[k] = Number($(k).value); const r = await api('/api/admin/settings', { method: 'POST', body: JSON.stringify(b) }); if (r.error) alert(r.error); load(); });
|
||||
$('tickFaucet').addEventListener('click', async () => { $('faucetLine').textContent = 'running…'; const r = await api('/api/admin/faucet/tick', { method: 'POST' }); $('faucetLine').textContent = r.error ? r.error : 'paid ' + r.paid + ' · balance ' + (r.balance == null ? '—' : Number(r.balance).toFixed(4) + ' POL'); load(); });
|
||||
|
||||
+5
-4
@@ -5,7 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Your board · PolHunter</title>
|
||||
<meta name="robots" content="noindex">
|
||||
<link rel="stylesheet" href="/style.css?v=19">
|
||||
<link rel="stylesheet" href="/style.css?v=20">
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
@@ -37,7 +37,7 @@
|
||||
<div class="badge-strip" id="badgeStrip"></div>
|
||||
</section>
|
||||
|
||||
<div class="adslot" data-ad="board"><!-- nas: 468x60 on phones, 728x90 on wider screens --><script>(function(){var m=window.innerWidth<600;document.write('<scr'+'ipt src="https://www.networkadspace.com/showadss.php?'+(m?'w=468&h=60&n=1&bw=468&bh=60':'w=728&h=90&n=1&bw=728&bh=90')+'&c=999"></scr'+'ipt>');})();</script></div>
|
||||
<div class="adslot" data-nas data-ad="board"><!-- nas: 468x60 on phones, 728x90 on wider screens; framed by /nas.js so a dead ad server never blocks the page --></div>
|
||||
|
||||
<section class="section">
|
||||
<h2>Your drips</h2>
|
||||
@@ -53,11 +53,12 @@
|
||||
<p class="small" style="margin-top:10px">Banners, swipes and the teaser video are on the <a href="/promo">promo tools</a> page, already carrying your link.</p>
|
||||
</section>
|
||||
|
||||
<footer class="foot">Rewards are for completed missions, not income. The daily pool is limited; when it is spent, claims close until midnight Central. Cryptocurrency involves risk of loss.</footer>
|
||||
<footer class="foot">Rewards are for completed missions, not income. The daily pool is limited; when it is spent, claims close until midnight Central. Cryptocurrency involves risk of loss.<br>© 2026 TrustClickz · <a href="/terms">Terms</a> · <a href="/disclaimer">Rewards disclaimer</a> · <a href="/privacy">Privacy</a> · <a href="https://instantadpay.com/support" rel="noopener">Support</a></footer>
|
||||
</div>
|
||||
<div class="modal" id="shareModal" hidden><div class="modal-card"><button class="modal-x" id="shareClose" type="button" aria-label="Close">×</button><div id="shareBody"></div></div></div>
|
||||
<script src="https://instantadpay.com/assets/game-strip.js?v=20261003a"></script>
|
||||
<script>if (window.IAPGames) IAPGames.strip(document.getElementById('moreGames'), { current: 'polhunter', title: ' ' }).then(function (n) { var m = document.getElementById('moreGames'), h = m.querySelector('.gs-h'); if (h) h.remove(); document.getElementById('moreGamesSec').hidden = !n; });</script>
|
||||
<script src="/app.js?v=22"></script>
|
||||
<script src="/app.js?v=23"></script>
|
||||
<script src="/nas.js?v=20261024" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+22
-8
@@ -35,9 +35,9 @@
|
||||
const isOpen = open && open.missionId === m.id;
|
||||
const r = m.reward || {};
|
||||
return '<div class="card' + (isOpen ? ' mission-open' : '') + '" data-id="' + esc(m.id) + '">'
|
||||
+ '<span class="tag' + (m.done ? ' done' : '') + '">' + (m.done ? 'Done today' : esc(m.site)) + '</span>'
|
||||
+ '<span class="tag' + (m.done ? ' done' : '') + '">' + (m.done ? 'Done today' : esc(m.site)) + '</span>' + (!m.done && m.fresh ? ' <span class="tag gold">New to you</span>' : '')
|
||||
+ '<h3>' + esc(m.name) + '</h3><p>' + esc(m.brief) + '</p>'
|
||||
+ '<p style="margin-top:10px"><span class="range">' + r.minPol + ' to ' + r.maxPol + ' POL</span> <span style="color:var(--dim);font-size:12px">· ' + m.dwell + 's on the site</span></p>'
|
||||
+ '<p style="margin-top:10px"><span class="range">' + (m.tourStop ? 'Tour stop: +' + m.tourStop.credits + ' ad credits' : r.minPol + ' to ' + r.maxPol + ' POL') + '</span> <span style="color:var(--dim);font-size:12px">· ' + m.dwell + 's on the site</span></p>'
|
||||
+ (m.done ? '' : (board.pool && board.pool.spent && !isOpen) ? '<div class="cardact"><span class="tag gold">Closed until midnight Central</span></div>' : (board.daily && !board.daily.left && !isOpen) ? '<div class="cardact"><span class="tag">Back tomorrow</span></div>' : isOpen
|
||||
? '<div class="timer" id="timer">Your code appears on the site after <b>' + m.dwell + 's</b>. Keep that tab open.</div>'
|
||||
+ '<div class="codebox"><input id="code" maxlength="6" placeholder="6 CHARACTERS" autocomplete="off" spellcheck="false" inputmode="text" autocapitalize="characters"><button class="btn pol" id="submit">Claim</button></div><div class="site" style="font-size:12px;margin-top:6px">Six characters. On the site, tap the code to copy it, then paste it here.</div>'
|
||||
@@ -97,7 +97,7 @@
|
||||
// badge cards: art, lock state, share
|
||||
function badgeStrip() {
|
||||
const el = $('badgeStrip'); if (!el || !board.badgeCards) return;
|
||||
el.innerHTML = board.badgeCards.map(b => '<div class="badge-a' + (b.earned ? '' : ' locked') + '"><img src="' + b.art + '" alt="' + esc(b.name) + '" loading="lazy"><div class="bl">' + b.icon + ' ' + esc(b.name) + '</div><div class="bs">' + esc(b.why) + '</div>' + (b.earned ? '<button class="btn pol sm" data-share="' + b.id + '">Share</button>' : '<div class="bs">\u{1F512} locked</div>') + '</div>').join('');
|
||||
el.innerHTML = board.badgeCards.map(b => '<div class="badge-a' + (b.earned ? '' : ' locked') + '"><img src="' + b.art + '" alt="' + esc(b.name) + '" loading="lazy"><div class="bl">' + b.icon + ' ' + esc(b.name) + (b.count ? ' \u00d7' + b.count : '') + '</div><div class="bs">' + esc(b.why) + '</div>' + (b.earned ? '<button class="btn pol sm" data-share="' + b.id + '">Share</button>' : '<div class="bs">\u{1F512} locked</div>') + '</div>').join('');
|
||||
el.querySelectorAll('[data-share]').forEach(x => x.addEventListener('click', () => shareBadge(x.dataset.share, false)));
|
||||
}
|
||||
function shareBadge(id, unlocked) {
|
||||
@@ -112,16 +112,27 @@
|
||||
$('shareCopy').onclick = async () => { try { await navigator.clipboard.writeText(b.page); } catch (e) {} $('shareCopy').textContent = 'Copied'; setTimeout(() => { $('shareCopy').textContent = 'Copy link'; }, 1200); };
|
||||
}
|
||||
document.addEventListener('click', e => { if (e.target.id === 'shareClose' || e.target.id === 'shareModal') $('shareModal').hidden = true; });
|
||||
// the Network Tour (2026-11-17): how far through this round, which sites are left; a free member who has toured
|
||||
// everything is told what a repeat pays now (ad credits) and how POL comes back (new sites, or the Game Pass)
|
||||
function tourPanel() {
|
||||
const t = board.tour; if (!t || !t.on || !t.total) return '';
|
||||
const pct = Math.round(100 * t.done / t.total);
|
||||
const free = t.free && t.toured ? '<p class="tour-free">You\u2019ve toured the whole network. New sites pay POL when they launch. Want POL on every hunt? ' + (board.gamepass && board.gamepass.url ? '<a href="' + esc(board.gamepass.url) + '" target="_blank" rel="noopener">Get the Game Pass</a>.' : 'Get the Game Pass.') + ' Until then each hunt is a tour stop worth +' + t.tourStopCredits + ' InstantAdPay ad credits.</p>' : '';
|
||||
return '<div class="tour" style="grid-column:1/-1"><div class="tour-hd"><b>\u{1F5FA}\uFE0F Network tour:</b> ' + t.done + ' of ' + t.total + ' sites this round' + (t.rounds ? ' <span class="tour-r">\u00b7 ' + t.rounds + ' round' + (t.rounds === 1 ? '' : 's') + ' done</span>' : '') + '</div>'
|
||||
+ '<div class="tour-bar" role="progressbar" aria-valuemin="0" aria-valuemax="' + t.total + '" aria-valuenow="' + t.done + '"><i style="width:' + pct + '%"></i></div>'
|
||||
+ (t.left.length ? '<div class="tour-left">Left this round: ' + t.left.map(esc).join(' \u00b7 ') + '</div>' : '')
|
||||
+ free + '</div>';
|
||||
}
|
||||
function render() {
|
||||
badgeStrip();
|
||||
$('who').innerHTML = '<i></i> ' + esc(board.me.username ? '@' + board.me.username : '#' + board.me.memberId) + (board.me.wallet ? '' : ' · no wallet linked')
|
||||
// Game Pass (InstantAdPay, all nine games): active until <date>, or the link to get it; opens a new tab (the game may be framed)
|
||||
+ (board.gamepass && board.gamepass.on ? ' · ' + (board.gamepass.active ? '\u{1F3AB} Game Pass active' + (board.gamepass.untilText ? ' until ' + esc(board.gamepass.untilText) : '') + ' (5 missions a day, 2 Ad Detective cases)' : '\u{1F3AB} <a href="' + esc(board.gamepass.url) + '" target="_blank" rel="noopener">Get the Game Pass</a>: higher daily POL caps, 5 missions a day, 2 cases') : '');
|
||||
const r = board.missions[0] && board.missions[0].reward;
|
||||
if (r) $('rangeLine').textContent = 'Each find pays a random drip between ' + r.minPol + ' and ' + r.maxPol + ' POL. Your codes are yours alone.';
|
||||
if (r) $('rangeLine').textContent = (board.tour && board.tour.free && board.tour.toured) ? 'A site new to you pays a random drip of POL; a repeat is a tour stop worth ' + board.tour.tourStopCredits + ' ad credits. Your codes are yours alone.' : 'Each find pays a random drip between ' + r.minPol + ' and ' + r.maxPol + ' POL. Your codes are yours alone.';
|
||||
const pool = board.pool || {};
|
||||
if (!board.me.wallet) $('missions').innerHTML = onboarding();
|
||||
else $('missions').innerHTML = (pool.spent ? '<div class="notice" style="grid-column:1/-1"><b>Today\u2019s POL pool is spent.</b> No more claims today. Claims reopen at midnight Central' + (pool.resetsAt ? ', in ' + until(pool.resetsAt) : '') + '.</div>' : '')
|
||||
else $('missions').innerHTML = tourPanel() + (pool.spent ? '<div class="notice" style="grid-column:1/-1"><b>Today\u2019s POL pool is spent.</b> No more claims today. Claims reopen at midnight Central' + (pool.resetsAt ? ', in ' + until(pool.resetsAt) : '') + '.</div>' : '')
|
||||
+ (board.missions.length ? board.missions.map(card).join('') : '<div class="card"><p>No missions are open right now. Check back soon.</p></div>');
|
||||
if ($('refSlot')) $('refSlot').innerHTML = board.me.wallet ? referralCard() : '';
|
||||
wireRefVideo();
|
||||
@@ -156,7 +167,7 @@
|
||||
fridayCard(board.fridayBank);
|
||||
boxCard(board.box);
|
||||
const dl = board.daily; if (dl && $('rangeLine')) $('rangeLine').innerHTML = ($('rangeLine').textContent.replace(/\s*·\s*You have.*$/, '')) + ' \u00b7 ' + (dl.left ? 'You have <b>' + dl.left + ' of ' + dl.limit + '</b> missions left today.' : '<b>That is your ' + dl.limit + ' for today.</b> Fresh missions at midnight Central.');
|
||||
$('mine').innerHTML = board.drips.length ? board.drips.map(d => '<div class="row"><span>' + (String(d.missionId || '').startsWith('detective:') ? '\u{1F50E} ' : '') + esc(d.site) + '</span><span class="site">' + ({ paid: 'paid', sent: 'sending', due: 'paying next', queued: 'queued for the next pool', failed: 'held, being looked at' }[d.status] || d.status) + '</span><span class="pol">+' + d.pol + ' POL</span>' + (d.tx ? '<a class="when" target="_blank" rel="noopener" href="' + explorer + '/tx/' + d.tx + '">verify ↗</a>' : '<span class="when"></span>') + '</div>').join('')
|
||||
$('mine').innerHTML = board.drips.length ? board.drips.map(d => '<div class="row"><span>' + (String(d.missionId || '').startsWith('detective:') ? '\u{1F50E} ' : '') + esc(d.site) + '</span><span class="site">' + ({ paid: 'paid', sent: 'sending', due: 'paying next', queued: 'queued for the next pool', failed: 'held, being looked at', tour: 'tour stop' + (d.tourStop && d.tourStop.credits ? ': +' + d.tourStop.credits + ' ad credits' + (d.tourStop.state === 'sent' ? '' : ' (sending)') : '') }[d.status] || d.status) + '</span><span class="pol">' + (d.status === 'tour' ? '0' : '+' + d.pol) + ' POL</span>' + (d.tx ? '<a class="when" target="_blank" rel="noopener" href="' + explorer + '/tx/' + d.tx + '">verify ↗</a>' : '<span class="when"></span>') + '</div>').join('')
|
||||
: '<div class="row"><span class="site">Nothing yet. Your first find goes here.</span></div>';
|
||||
document.querySelectorAll('[data-start]').forEach(b => b.addEventListener('click', () => start(b.dataset.start)));
|
||||
const s = $('submit'); if (s) { s.addEventListener('click', submit); $('code').addEventListener('keydown', e => { if (e.key === 'Enter') submit(); }); tick(); }
|
||||
@@ -220,7 +231,8 @@
|
||||
const head = t => '<div class="box-hd">\u{1F381} Mystery Hunt Box</div><h3>' + t + '</h3>';
|
||||
const rule = '<p class="box-rule">One answer only. Look carefully before answering.</p>';
|
||||
let h = '';
|
||||
if (bx.status === 'locked') h = head('Unlocks when today’s hunts are done') + '<p>Find all ' + bx.need + ' of today’s codes and your box opens: a bonus case worth a fixed <b>' + pol + '</b>. <span class="box-dim">' + bx.done + ' of ' + bx.need + ' found.</span></p>';
|
||||
if (bx.status === 'pass') h = head('A Game Pass perk') + '<p>Game Pass holders hunt five codes a day at the full reward, and their box opens after the last one with a bonus case worth a fixed <b>' + pol + '</b>. <a href="https://instantadpay.com/my#passes" target="_blank" rel="noopener">Get the Game Pass on InstantAdPay</a>.</p>';
|
||||
else if (bx.status === 'locked') h = head('Unlocks when today’s hunts are done') + '<p>Find all ' + bx.need + ' of today’s codes and your box opens: a bonus case worth a fixed <b>' + pol + '</b>. <span class="box-dim">' + bx.done + ' of ' + bx.need + ' found.</span></p>';
|
||||
else if (bx.status === 'ready') h = head('Your box is ready') + '<p>Open it to see today’s bonus case. It pays a fixed <b>' + pol + '</b> and does not use up a mission.</p><button class="btn pol" id="boxOpen">Open the box</button>';
|
||||
else if (bx.status === 'open') h = head('\u{1F50E} Ad Detective on ' + esc(bx.site)) + '<p>Reward: <b>' + pol + '</b>, fixed. Visit the site and look around for at least ' + bx.dwell + ' seconds. Then come back here and answer <b>one question</b> about what the site says.</p>' + rule + '<button class="btn pol" id="boxStart">Begin the case</button>';
|
||||
else if (bx.status === 'started') { h = head('\u{1F50E} On the case: ' + esc(bx.site)) + '<p>Stay on the site tab for at least ' + bx.dwell + ' seconds and read what it says. A note on the page tells you when your visit is recorded. Your question appears here right after.</p><p><a href="' + esc(bx.url || '#') + '" target="_blank" rel="noopener">Open the site again ↗</a> <span class="box-dim">· if the note never showed, press Begin again after this attempt times out.</span></p>' + (bx.expires && Date.now() > bx.expires ? '<button class="btn" id="boxStart">Begin again</button>' : ''); boxPoll = setTimeout(boxRefresh, 6000); }
|
||||
@@ -267,7 +279,9 @@
|
||||
const m = $('msg'); m.className = 'msg ' + (r.error ? 'bad' : 'ok'); m.textContent = r.error || r.message;
|
||||
if (!r.error && r.gamepass) board.gamepass = r.gamepass; // the Game Pass flag refreshes with every grant answer
|
||||
if (!r.error && /Get the Pass/.test(r.message || '') && board.gamepass && board.gamepass.on && !board.gamepass.active) m.innerHTML = esc(r.message) + ' <a href="' + esc(board.gamepass.url) + '" target="_blank" rel="noopener">Get the Game Pass</a>'; // the cap-hit nudge, in a new tab (the page may be framed)
|
||||
if (r.error) toast(esc(r.error), 'bad'); else toast('\u{1F389} <b>Found it!</b> ' + r.pol + ' POL is on its way to your wallet.', 'big');
|
||||
if (r.error) toast(esc(r.error), 'bad'); else if (r.tourStop) toast('\u{1F5FA}\uFE0F <b>Tour stop!</b> ' + (r.tourStop.credits ? '+' + r.tourStop.credits + ' ad credits to your InstantAdPay account.' : 'Logged for your network tour.'), 'big'); else toast('\u{1F389} <b>Found it!</b> ' + r.pol + ' POL is on its way to your wallet.', 'big');
|
||||
if (!r.error && r.tourStop && board.gamepass && board.gamepass.on && !board.gamepass.active) m.innerHTML = esc(r.message) + ' <a href="' + esc(board.gamepass.url) + '" target="_blank" rel="noopener">Get the Game Pass</a>';
|
||||
if (!r.error && r.round) toast('\u{1F5FA}\uFE0F <b>Full Network Tour!</b> Round ' + r.round + ' done. A new round starts now.', 'big');
|
||||
if (!r.error) { const a = document.createElement('a'); a.href = '#share'; a.textContent = ' Share this find \u2197'; a.style.marginLeft = '6px'; m.appendChild(a); delete $('sharetext').dataset.touched; }
|
||||
// an achievement unlocked by this find: celebrate it once the board has reloaded
|
||||
if (!r.error && r.unlocked && r.unlocked.length) { const id = r.unlocked[0]; toast('\u{1F3C6} <b>Achievement unlocked!</b>', 'big'); setTimeout(async () => { await load(); shareBadge(id, true); }, 1200); }
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Rewards Disclaimer · PolHunter</title>
|
||||
<meta name="description" content="Rewards for finds, not income. Nothing is promised.">
|
||||
<link rel="canonical" href="https://polhunter.com/disclaimer">
|
||||
<link rel="stylesheet" href="/style.css?v=12">
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
<header class="top">
|
||||
<a class="mark" href="/"><span class="coin"></span>PolHunter</a>
|
||||
<nav class="nav">
|
||||
<a class="btn ghost sm" href="/#how">How it works</a>
|
||||
<a class="btn ghost sm" href="/leaders">Leaderboard</a>
|
||||
</nav>
|
||||
</header>
|
||||
<section class="section" style="padding-top:14px">
|
||||
<div class="small">Last updated November 17, 2026</div>
|
||||
<h2>PolHunter Rewards Disclaimer</h2>
|
||||
<div class="sub">Rewards for finds, not income. Nothing is promised.</div>
|
||||
<h3 style="margin:22px 0 6px;font-size:19px">What a reward is</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">A PolHunter drip is a small reward for a completed mission, paid in POL from a limited daily pool. It is not income, a wage, an investment or a promise of any payment.</p><h3 style="margin:22px 0 6px;font-size:19px">Nothing is guaranteed</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">Drips are random within the posted range. The daily pool is limited, and when it is spent claims close until midnight Central. Missions, ranges and prizes can change at any time.</p><h3 style="margin:22px 0 6px;font-size:19px">No examples are promises</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">Any number on this site, in the ledger, on the leaderboard or in a Telegram post shows what really happened. It is not a typical result and not a forecast of what you will receive.</p><h3 style="margin:22px 0 6px;font-size:19px">Prices and taxes</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">POL's price moves, so the dollar value of a drip can change. You are responsible for any taxes on what you receive where you live.</p><h3 style="margin:22px 0 6px;font-size:19px">Who to ask</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">TrustClickz. <a href="https://instantadpay.com/support" rel="noopener">Network support</a>.</p>
|
||||
</section>
|
||||
<footer class="foot">PolHunter rewards completed missions. Rewards are not income and are not guaranteed. Cryptocurrency involves risk of loss.<br>© 2026 TrustClickz · <a href="/terms">Terms</a> · <a href="/disclaimer">Rewards disclaimer</a> · <a href="/privacy">Privacy</a> · <a href="https://instantadpay.com/support" rel="noopener">Support</a> · <a href="https://instantadpay.com">InstantAdPay</a></footer>
|
||||
</div>
|
||||
</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">
|
||||
<title>PolHunter FAQ · PolHunter</title>
|
||||
<meta name="description" content="Short answers on cost, wallets, codes a day, what a find pays, the Central-time reset, the daily pool and the Game Pass.">
|
||||
<link rel="canonical" href="https://polhunter.com/guides/faq">
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="og:site_name" content="PolHunter">
|
||||
<meta property="og:title" content="PolHunter FAQ · PolHunter">
|
||||
<meta property="og:description" content="Short answers on cost, wallets, codes a day, what a find pays, the Central-time reset, the daily pool and the Game Pass.">
|
||||
<meta property="og:url" content="https://polhunter.com/guides/faq">
|
||||
<meta property="og:image" content="https://polhunter.com/promo/polhunter-1200x630.jpg">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:image" content="https://polhunter.com/promo/polhunter-1200x630.jpg">
|
||||
<link rel="stylesheet" href="/style.css?v=12">
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
<header class="top">
|
||||
<a class="mark" href="/"><span class="coin"></span>PolHunter</a>
|
||||
<nav class="nav">
|
||||
<a class="btn pol sm" href="https://instantadpay.com/my" title="Back to your InstantAdPay dashboard">← InstantAdPay</a>
|
||||
<a class="btn ghost sm" href="/guides">Guides</a>
|
||||
<a class="btn ghost sm" href="/leaders">Leaderboard</a>
|
||||
<a class="btn sm" href="https://instantadpay.com/api/my/polhunter">Open my board</a>
|
||||
</nav>
|
||||
</header>
|
||||
<section class="section" style="padding-top:14px">
|
||||
<div class="small"><a href="/guides">Guides</a> · PolHunter FAQ</div>
|
||||
<h2>PolHunter FAQ</h2>
|
||||
<div class="sub">Short answers on cost, wallets, codes a day, what a find pays, the Central-time reset, the daily pool and the Game Pass.</div>
|
||||
<h3 style="margin:22px 0 6px;font-size:19px">Does PolHunter cost anything?</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">No. You hunt with a free InstantAdPay account. The Game Pass is optional and sold on InstantAdPay.</p><h3 style="margin:22px 0 6px;font-size:19px">Do I need a new account?</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">No. You sign in with your InstantAdPay account. No separate account or password is created here.</p><h3 style="margin:22px 0 6px;font-size:19px">Which wallet do I need?</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">SafePal or any other crypto wallet that works on Polygon. Link it in your InstantAdPay dashboard under Wallet; drips go to that address.</p><h3 style="margin:22px 0 6px;font-size:19px">How many codes can I find a day?</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">A free account finds 1 code a day. Game Pass holders find 5. Advertiser missions and Friday Bonus Hunts can add more.</p><h3 style="margin:22px 0 6px;font-size:19px">How much does a find pay?</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">A free find pays a random 0.02 to 0.10 POL the first time you find each site; after you have found them all, a repeat find is a tour stop worth 10 InstantAdPay ad credits instead, and a new site pays POL again on your first find. With the Game Pass a find pays a random 0.05 to 1 POL. Both lean toward the low end. Advertiser missions pay the amount the advertiser set.</p><h3 style="margin:22px 0 6px;font-size:19px">What is the network tour?</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">Your board offers only the sites you have not found yet this round, the ones new to you first. Find every site and a new round starts, and each finished round counts toward the Full Network Tour badge.</p><h3 style="margin:22px 0 6px;font-size:19px">When does the day reset?</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">At midnight Central time. The missions, your codes and the daily pool all reset then.</p><h3 style="margin:22px 0 6px;font-size:19px">Why does my board say claims are closed?</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">The daily pool is spent. Claims reopen at midnight Central, and a find that went over the pool can be paid on a later day.</p><h3 style="margin:22px 0 6px;font-size:19px">How fast am I paid?</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">The reward wallet sends due drips every couple of minutes. Each one shows up with a Polygonscan link you can open.</p><h3 style="margin:22px 0 6px;font-size:19px">Can I use a code a friend found?</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">No. Every code is made for one hunter and one visit. Someone else’s code will not work for you.</p><h3 style="margin:22px 0 6px;font-size:19px">Can I run two accounts?</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">No. One person, one account. Two accounts that share a wallet get one drip per mission per day between them.</p><h3 style="margin:22px 0 6px;font-size:19px">What are Friday Bonus Hunts?</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">Each day from Saturday through Thursday that you open an inbox ad and watch a video on InstantAdPay banks one extra hunt, usable on the Friday that follows.</p><h3 style="margin:22px 0 6px;font-size:19px">What is the Mystery Hunt Box?</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">A Game Pass perk. Finish the day’s hunts and a box opens an Ad Detective case: visit a network site and answer one question about it. The reward is fixed and shown before you start.</p><h3 style="margin:22px 0 6px;font-size:19px">How do the weekly prizes work?</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">The leaderboard ranks hunters by finds from Monday to Sunday, Central time. Ties go to the most POL, then to whoever got there first. The weekly prizes go to Game Pass holders and are paid on chain.</p><h3 style="margin:22px 0 6px;font-size:19px">Do I earn for bringing people?</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">New members you bring can earn you referral rewards, paid from their own pool. Only people who were never members before count.</p><h3 style="margin:22px 0 6px;font-size:19px">Is this income?</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">No. PolHunter rewards completed missions. Rewards are not income and are not guaranteed, and the price of POL moves.</p><h3 style="margin:22px 0 6px;font-size:19px">Where do I get help?</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">Use <a href="https://instantadpay.com/support" rel="noopener">network support</a>.</p>
|
||||
</section>
|
||||
<section class="section"><h2>More guides</h2><div class="steps"><div class="step"><b><a href="/guides/how-a-hunt-works">How a hunt works</a></b><br>Missions, codes, the daily reset, and what each find pays.</div><div class="step"><b><a href="/guides/is-polhunter-legit">Is PolHunter legit?</a></b><br>The reward wallet, every payout with a transaction, and the public ledger.</div><div class="step"><b><a href="/guides/free-account">Getting the most from your free account</a></b><br>Set up once, hunt every day, and the extras that cost nothing.</div></div></section>
|
||||
<footer class="foot">PolHunter rewards completed missions. Rewards are not income and are not guaranteed. Cryptocurrency involves risk of loss.<br>© 2026 TrustClickz · <a href="/guides">Guides</a> · <a href="/terms">Terms</a> · <a href="/disclaimer">Rewards disclaimer</a> · <a href="/privacy">Privacy</a> · <a href="https://instantadpay.com/support" rel="noopener">Support</a> · <a href="https://instantadpay.com">InstantAdPay</a></footer>
|
||||
</div>
|
||||
</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">
|
||||
<title>Getting the most from your free account · PolHunter</title>
|
||||
<meta name="description" content="Set up your InstantAdPay account and wallet first, then the free extras: daily hunts, Friday Bonus Hunts, advertiser missions and sharing.">
|
||||
<link rel="canonical" href="https://polhunter.com/guides/free-account">
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="og:site_name" content="PolHunter">
|
||||
<meta property="og:title" content="Getting the most from your free account · PolHunter">
|
||||
<meta property="og:description" content="Set up your InstantAdPay account and wallet first, then the free extras: daily hunts, Friday Bonus Hunts, advertiser missions and sharing.">
|
||||
<meta property="og:url" content="https://polhunter.com/guides/free-account">
|
||||
<meta property="og:image" content="https://polhunter.com/promo/polhunter-1200x630.jpg">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:image" content="https://polhunter.com/promo/polhunter-1200x630.jpg">
|
||||
<link rel="stylesheet" href="/style.css?v=12">
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
<header class="top">
|
||||
<a class="mark" href="/"><span class="coin"></span>PolHunter</a>
|
||||
<nav class="nav">
|
||||
<a class="btn pol sm" href="https://instantadpay.com/my" title="Back to your InstantAdPay dashboard">← InstantAdPay</a>
|
||||
<a class="btn ghost sm" href="/guides">Guides</a>
|
||||
<a class="btn ghost sm" href="/leaders">Leaderboard</a>
|
||||
<a class="btn sm" href="https://instantadpay.com/api/my/polhunter">Open my board</a>
|
||||
</nav>
|
||||
</header>
|
||||
<section class="section" style="padding-top:14px">
|
||||
<div class="small"><a href="/guides">Guides</a> · Getting the most from your free account</div>
|
||||
<h2>Getting the most from your free account</h2>
|
||||
<div class="sub">Set up your InstantAdPay account and wallet first, then the free extras: daily hunts, Friday Bonus Hunts, advertiser missions and sharing.</div>
|
||||
<h3 style="margin:22px 0 6px;font-size:19px">Set it up once</h3><div class="steps"><div class="step"><b>Create your free InstantAdPay account</b> at <a href="https://instantadpay.com/?from=polhunter" target="_blank" rel="noopener">instantadpay.com</a>. Email first, no wallet needed to sign up.</div><div class="step"><b>Link your wallet.</b> In your InstantAdPay dashboard open <a href="https://instantadpay.com/my#wallet" target="_blank" rel="noopener">Wallet</a> and connect SafePal or any other crypto wallet. Every drip lands at that address, on Polygon.</div><div class="step"><b>Open your board</b> with <a href="https://instantadpay.com/api/my/polhunter">Open my board</a>. No new password: InstantAdPay signs you straight in.</div></div><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">Without a linked wallet you can see your board, but you cannot start a mission. That is the most common thing that stops a new hunter, so do it first.</p><h3 style="margin:22px 0 6px;font-size:19px">Hunt every day</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">A free account gets one code a day, and missions reset at midnight Central. Each site pays POL the first time you find it; once you have toured them all, a repeat find is a tour stop worth 10 InstantAdPay ad credits, and new sites pay POL again. One find a day, every day, is the habit that counts. Your finds also earn badges and put you on the <a href="/leaders">leaderboard</a>.</p><h3 style="margin:22px 0 6px;font-size:19px">Bank Friday Bonus Hunts</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">From Saturday through Thursday, each day you open an inbox ad and watch a video on InstantAdPay banks one extra hunt for Friday. You can also earn ad credits while you are there. Ad credits buy advertising, not income.</p><h3 style="margin:22px 0 6px;font-size:19px">Look for advertiser missions</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">When an advertiser mission is live and you have not done it today, it adds one extra hunt to your day and pays the amount the advertiser set.</p><h3 style="margin:22px 0 6px;font-size:19px">Share PolHunter</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">Your board has your own share link. People who join InstantAdPay from it are your referrals there, and new members you bring can also earn you referral rewards here, paid from their own pool. Only people who were never members before count.</p><h3 style="margin:22px 0 6px;font-size:19px">When you want more</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">The Game Pass on InstantAdPay is optional. With it you hunt 5 codes a day on the full draw, and you get the Mystery Hunt Box, the Ad Detective cases and the weekly prizes. Hunting free is fine too.</p>
|
||||
</section>
|
||||
<section class="section"><h2>More guides</h2><div class="steps"><div class="step"><b><a href="/guides/how-a-hunt-works">How a hunt works</a></b><br>Missions, codes, the daily reset, and what each find pays.</div><div class="step"><b><a href="/guides/is-polhunter-legit">Is PolHunter legit?</a></b><br>The reward wallet, every payout with a transaction, and the public ledger.</div><div class="step"><b><a href="/guides/faq">PolHunter FAQ</a></b><br>Short answers to the questions hunters ask most.</div></div></section>
|
||||
<footer class="foot">PolHunter rewards completed missions. Rewards are not income and are not guaranteed. Cryptocurrency involves risk of loss.<br>© 2026 TrustClickz · <a href="/guides">Guides</a> · <a href="/terms">Terms</a> · <a href="/disclaimer">Rewards disclaimer</a> · <a href="/privacy">Privacy</a> · <a href="https://instantadpay.com/support" rel="noopener">Support</a> · <a href="https://instantadpay.com">InstantAdPay</a></footer>
|
||||
</div>
|
||||
</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">
|
||||
<title>How a hunt works · PolHunter</title>
|
||||
<meta name="description" content="Missions, personal codes, once per mission per Central day, and what a find pays on a free account and with the Game Pass.">
|
||||
<link rel="canonical" href="https://polhunter.com/guides/how-a-hunt-works">
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="og:site_name" content="PolHunter">
|
||||
<meta property="og:title" content="How a hunt works · PolHunter">
|
||||
<meta property="og:description" content="Missions, personal codes, once per mission per Central day, and what a find pays on a free account and with the Game Pass.">
|
||||
<meta property="og:url" content="https://polhunter.com/guides/how-a-hunt-works">
|
||||
<meta property="og:image" content="https://polhunter.com/promo/polhunter-1200x630.jpg">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:image" content="https://polhunter.com/promo/polhunter-1200x630.jpg">
|
||||
<link rel="stylesheet" href="/style.css?v=12">
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
<header class="top">
|
||||
<a class="mark" href="/"><span class="coin"></span>PolHunter</a>
|
||||
<nav class="nav">
|
||||
<a class="btn pol sm" href="https://instantadpay.com/my" title="Back to your InstantAdPay dashboard">← InstantAdPay</a>
|
||||
<a class="btn ghost sm" href="/guides">Guides</a>
|
||||
<a class="btn ghost sm" href="/leaders">Leaderboard</a>
|
||||
<a class="btn sm" href="https://instantadpay.com/api/my/polhunter">Open my board</a>
|
||||
</nav>
|
||||
</header>
|
||||
<section class="section" style="padding-top:14px">
|
||||
<div class="small"><a href="/guides">Guides</a> · How a hunt works</div>
|
||||
<h2>How a hunt works</h2>
|
||||
<div class="sub">Missions, personal codes, once per mission per Central day, and what a find pays on a free account and with the Game Pass.</div>
|
||||
<h3 style="margin:22px 0 6px;font-size:19px">The short version</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">PolHunter is a scavenger hunt across the network. A mission sends you to one of our sites. You spend the time on the page, your personal code shows up somewhere on it, and you type that code into your board. A correct code pays a random drip of POL on Polygon to the wallet on your InstantAdPay account.</p><h3 style="margin:22px 0 6px;font-size:19px">Step by step</h3><div class="steps"><div class="step"><b>Pick a mission</b> on your board. Each one names a site and what to find there.</div><div class="step"><b>Go find it.</b> Stay on the page for the time the mission asks. Your code only appears after that.</div><div class="step"><b>Type the code.</b> If it is yours, the drip is recorded right away and the reward wallet sends it to your wallet, with a Polygonscan link to prove it.</div></div><h3 style="margin:22px 0 6px;font-size:19px">Your code is yours alone</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">Each code is made for you and for that one visit, and it only shows on the mission site after the wait. A code copied from someone else will not work for you, and the hiding place moves.</p><h3 style="margin:22px 0 6px;font-size:19px">How many codes a day</h3><table style="width:100%;max-width:640px;border-collapse:collapse;margin:6px 0 14px;font-size:15px"><tr style="text-align:left;border-bottom:1px solid var(--edge)"><th style="padding:8px 6px">Account</th><th style="padding:8px 6px">Codes a day</th><th style="padding:8px 6px">Each find pays</th></tr><tr style="border-bottom:1px solid var(--edge)"><td style="padding:8px 6px">Free InstantAdPay account</td><td style="padding:8px 6px">1</td><td style="padding:8px 6px">0.02 to 0.10 POL on a site new to you; a repeat is a tour stop worth 10 InstantAdPay ad credits</td></tr><tr><td style="padding:8px 6px">Game Pass holder</td><td style="padding:8px 6px">5</td><td style="padding:8px 6px">0.05 to 1 POL</td></tr></table><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">The drip is random inside that range and weighted toward the low end, so small drips are common and big ones are rare. Advertiser missions, when there are any, pay the amount the advertiser set and add one extra hunt each.</p><h3 style="margin:22px 0 6px;font-size:19px">Once per mission per Central day</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">Each mission can be found once per day, and the day runs on Central time. At midnight Central the codes, the missions and the daily pool all reset. Two accounts that share a wallet get one drip per mission per day between them.</p><h3 style="margin:22px 0 6px;font-size:19px">The network tour</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">Your board walks you around the whole network. Each round, it only offers the sites you have not found yet this round, newest to you first; find them all and a new round starts, with the Full Network Tour badge for every round you finish.</p><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">On a free account, a find pays POL while you are discovering: the first time you find each site. Once you have found every site, a repeat find is a tour stop that pays 10 InstantAdPay ad credits instead of POL, and each new site that joins the network pays POL again on your first find. Game Pass holders are paid POL on every find.</p><h3 style="margin:22px 0 6px;font-size:19px">The daily pool</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">Finds are paid from a daily pool. If it is spent before the day ends, your board says so and claims reopen at midnight Central. A find that would go over the pool can be queued and paid on a later day instead.</p><h3 style="margin:22px 0 6px;font-size:19px">The extras</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65"><b>Friday Bonus Hunts.</b> On InstantAdPay, each day from Saturday through Thursday that you open an inbox ad and watch a video there banks one extra hunt for the Friday that follows.</p><p style="margin:0 0 12px;max-width:70ch;line-height:1.65"><b>Mystery Hunt Box and Ad Detective.</b> Game Pass holders who finish the day’s hunts unlock a box with an Ad Detective case: visit a network site, then answer one question about it. The reward is fixed and shown before you start.</p><p style="margin:0 0 12px;max-width:70ch;line-height:1.65"><b>Weekly prizes.</b> The <a href="/leaders">leaderboard</a> ranks hunters by finds, Monday to Sunday Central time. The weekly prizes go to Game Pass holders and are paid on chain from the same reward wallet.</p><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">Nothing here is promised. Rewards are not income, and the range, the number of hunts and the pools can change. See the <a href="/disclaimer">Rewards disclaimer</a>.</p>
|
||||
</section>
|
||||
<section class="section"><h2>More guides</h2><div class="steps"><div class="step"><b><a href="/guides/is-polhunter-legit">Is PolHunter legit?</a></b><br>The reward wallet, every payout with a transaction, and the public ledger.</div><div class="step"><b><a href="/guides/free-account">Getting the most from your free account</a></b><br>Set up once, hunt every day, and the extras that cost nothing.</div><div class="step"><b><a href="/guides/faq">PolHunter FAQ</a></b><br>Short answers to the questions hunters ask most.</div></div></section>
|
||||
<footer class="foot">PolHunter rewards completed missions. Rewards are not income and are not guaranteed. Cryptocurrency involves risk of loss.<br>© 2026 TrustClickz · <a href="/guides">Guides</a> · <a href="/terms">Terms</a> · <a href="/disclaimer">Rewards disclaimer</a> · <a href="/privacy">Privacy</a> · <a href="https://instantadpay.com/support" rel="noopener">Support</a> · <a href="https://instantadpay.com">InstantAdPay</a></footer>
|
||||
</div>
|
||||
</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">
|
||||
<title>PolHunter guides · PolHunter</title>
|
||||
<meta name="description" content="Plain answers on how PolHunter works, how it pays, and how to get the most from a free account.">
|
||||
<link rel="canonical" href="https://polhunter.com/guides">
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="og:site_name" content="PolHunter">
|
||||
<meta property="og:title" content="PolHunter guides · PolHunter">
|
||||
<meta property="og:description" content="Plain answers on how PolHunter works, how it pays, and how to get the most from a free account.">
|
||||
<meta property="og:url" content="https://polhunter.com/guides">
|
||||
<meta property="og:image" content="https://polhunter.com/promo/polhunter-1200x630.jpg">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:image" content="https://polhunter.com/promo/polhunter-1200x630.jpg">
|
||||
<link rel="stylesheet" href="/style.css?v=12">
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
<header class="top">
|
||||
<a class="mark" href="/"><span class="coin"></span>PolHunter</a>
|
||||
<nav class="nav">
|
||||
<a class="btn pol sm" href="https://instantadpay.com/my" title="Back to your InstantAdPay dashboard">← InstantAdPay</a>
|
||||
<a class="btn ghost sm" href="/guides">Guides</a>
|
||||
<a class="btn ghost sm" href="/leaders">Leaderboard</a>
|
||||
<a class="btn sm" href="https://instantadpay.com/api/my/polhunter">Open my board</a>
|
||||
</nav>
|
||||
</header>
|
||||
<section class="section" style="padding-top:14px">
|
||||
<div class="small"><a href="/guides">Guides</a></div>
|
||||
<h2>PolHunter guides</h2>
|
||||
<div class="sub">Plain answers on how PolHunter works, how it pays, and how to get the most from a free account.</div>
|
||||
<div class="steps"><div class="step"><b><a href="/guides/how-a-hunt-works">How a hunt works</a></b><br>Missions, codes, the daily reset, and what each find pays.</div><div class="step"><b><a href="/guides/is-polhunter-legit">Is PolHunter legit?</a></b><br>The reward wallet, every payout with a transaction, and the public ledger.</div><div class="step"><b><a href="/guides/free-account">Getting the most from your free account</a></b><br>Set up once, hunt every day, and the extras that cost nothing.</div><div class="step"><b><a href="/guides/faq">PolHunter FAQ</a></b><br>Short answers to the questions hunters ask most.</div></div><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">New here? Start with <a href="/guides/how-a-hunt-works">How a hunt works</a>, then set up your account with the <a href="/#start">three steps before your first hunt</a>.</p>
|
||||
</section>
|
||||
|
||||
<footer class="foot">PolHunter rewards completed missions. Rewards are not income and are not guaranteed. Cryptocurrency involves risk of loss.<br>© 2026 TrustClickz · <a href="/guides">Guides</a> · <a href="/terms">Terms</a> · <a href="/disclaimer">Rewards disclaimer</a> · <a href="/privacy">Privacy</a> · <a href="https://instantadpay.com/support" rel="noopener">Support</a> · <a href="https://instantadpay.com">InstantAdPay</a></footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,51 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Is PolHunter legit? · PolHunter</title>
|
||||
<meta name="description" content="Check it yourself: one public reward wallet on Polygon, every payout with a transaction link, and a live public ledger.">
|
||||
<link rel="canonical" href="https://polhunter.com/guides/is-polhunter-legit">
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="og:site_name" content="PolHunter">
|
||||
<meta property="og:title" content="Is PolHunter legit? · PolHunter">
|
||||
<meta property="og:description" content="Check it yourself: one public reward wallet on Polygon, every payout with a transaction link, and a live public ledger.">
|
||||
<meta property="og:url" content="https://polhunter.com/guides/is-polhunter-legit">
|
||||
<meta property="og:image" content="https://polhunter.com/promo/polhunter-1200x630.jpg">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:image" content="https://polhunter.com/promo/polhunter-1200x630.jpg">
|
||||
<link rel="stylesheet" href="/style.css?v=12">
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
<header class="top">
|
||||
<a class="mark" href="/"><span class="coin"></span>PolHunter</a>
|
||||
<nav class="nav">
|
||||
<a class="btn pol sm" href="https://instantadpay.com/my" title="Back to your InstantAdPay dashboard">← InstantAdPay</a>
|
||||
<a class="btn ghost sm" href="/guides">Guides</a>
|
||||
<a class="btn ghost sm" href="/leaders">Leaderboard</a>
|
||||
<a class="btn sm" href="https://instantadpay.com/api/my/polhunter">Open my board</a>
|
||||
</nav>
|
||||
</header>
|
||||
<section class="section" style="padding-top:14px">
|
||||
<div class="small"><a href="/guides">Guides</a> · Is PolHunter legit?</div>
|
||||
<h2>Is PolHunter legit?</h2>
|
||||
<div class="sub">Check it yourself: one public reward wallet on Polygon, every payout with a transaction link, and a live public ledger.</div>
|
||||
<h3 style="margin:22px 0 6px;font-size:19px">Check it yourself</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">You do not have to take our word for anything. Every PolHunter drip is a Polygon transaction sent from one public reward wallet, and you can open each one.</p><h3 style="margin:22px 0 6px;font-size:19px">The reward wallet</h3><div class="notice" style="margin:6px 0 14px;word-break:break-all"><b>PolHunter reward wallet:</b> <span class="num">0x90ECD51A565bFA2da3e577BbbBCA4aBff1F7A753</span><br><a href="https://polygonscan.com/address/0x90ECD51A565bFA2da3e577BbbBCA4aBff1F7A753" target="_blank" rel="noopener">Open it on Polygonscan ↗</a></div><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">Every find, prize and referral reward leaves from this address. On Polygonscan you can see each send, the amount, the wallet it went to and the time. PolHunter is not a contract: it is a wallet the company funds, and it pays out on its own every few minutes.</p><h3 style="margin:22px 0 6px;font-size:19px">The public ledger</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">The <a href="/#ledger">Paid so far</a> section on the home page shows the totals and the newest drips, each with a verify link to its transaction. Here are the live numbers:</p><div class="stats" id="stats"></div><div class="ledger" id="recent" style="margin-top:12px"><div class="row"><span class="site">Loading…</span></div></div><h3 style="margin:22px 0 6px;font-size:19px">Where the POL comes from</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">Regular finds are paid by the company as a marketing cost for the network: you visit our sites, we pay you a drip for it. Advertiser missions are paid out of what the advertiser put in. You never pay to hunt. The Game Pass is sold on InstantAdPay and is optional.</p><h3 style="margin:22px 0 6px;font-size:19px">What we ask of you, and what we never ask</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">You sign in with your InstantAdPay account and the drip goes to the wallet linked there. Nobody from PolHunter will ever ask for your recovery phrase or private key. If someone does, it is not us.</p><h3 style="margin:22px 0 6px;font-size:19px">What is not promised</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">PolHunter rewards completed missions. Rewards are not income, wages or an investment, and are not guaranteed. The price of POL moves. Read the <a href="/terms">Terms</a> and the <a href="/disclaimer">Rewards disclaimer</a>.</p>
|
||||
</section>
|
||||
<section class="section"><h2>More guides</h2><div class="steps"><div class="step"><b><a href="/guides/how-a-hunt-works">How a hunt works</a></b><br>Missions, codes, the daily reset, and what each find pays.</div><div class="step"><b><a href="/guides/free-account">Getting the most from your free account</a></b><br>Set up once, hunt every day, and the extras that cost nothing.</div><div class="step"><b><a href="/guides/faq">PolHunter FAQ</a></b><br>Short answers to the questions hunters ask most.</div></div></section>
|
||||
<footer class="foot">PolHunter rewards completed missions. Rewards are not income and are not guaranteed. Cryptocurrency involves risk of loss.<br>© 2026 TrustClickz · <a href="/guides">Guides</a> · <a href="/terms">Terms</a> · <a href="/disclaimer">Rewards disclaimer</a> · <a href="/privacy">Privacy</a> · <a href="https://instantadpay.com/support" rel="noopener">Support</a> · <a href="https://instantadpay.com">InstantAdPay</a></footer>
|
||||
</div>
|
||||
<script>
|
||||
(async () => {
|
||||
try {
|
||||
const r = await (await fetch('/api/ledger')).json(); const t = r.totals || {};
|
||||
const esc = s => String(s == null ? '' : s).replace(/[&<>"]/g, c => ({ '&': '&', '<': '<', '>': '>', '"': '"' }[c]));
|
||||
document.getElementById('stats').innerHTML = [['POL paid', (t.pol || 0).toLocaleString('en-US', { maximumFractionDigits: 2 })], ['drips', t.paid || 0], ['hunters', t.hunters || 0]]
|
||||
.map(([l, v]) => '<div class="stat"><div class="v num">' + v + '</div><div class="l">' + l + '</div></div>').join('');
|
||||
document.getElementById('recent').innerHTML = (r.recent || []).slice(0, 10).map(x => '<div class="row"><span>' + esc(x.who) + '</span><span class="site">' + esc(x.site) + '</span><span class="pol">+' + Number(x.pol) + ' POL</span><a class="when" href="https://polygonscan.com/tx/' + encodeURIComponent(x.tx) + '" target="_blank" rel="noopener">verify ↗</a></div>').join('') || '<div class="row"><span class="site">No drips yet.</span></div>';
|
||||
} catch (e) {}
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+5
-3
@@ -22,6 +22,7 @@
|
||||
<a class="btn pol sm" href="https://instantadpay.com/my" title="Back to your InstantAdPay dashboard">← InstantAdPay</a>
|
||||
<a class="btn ghost sm" href="#start">Get started</a>
|
||||
<a class="btn ghost sm" href="#how">How it works</a>
|
||||
<a class="btn ghost sm" href="/guides">Guides</a>
|
||||
<a class="btn ghost sm" href="/leaders">Leaderboard</a>
|
||||
<a class="btn sm" id="signin" href="https://instantadpay.com/api/my/polhunter">Open my board</a>
|
||||
</nav>
|
||||
@@ -56,7 +57,7 @@
|
||||
|
||||
<section class="section" id="how">
|
||||
<h2>How a hunt works</h2>
|
||||
<div class="sub">Three steps, one code, real POL.</div>
|
||||
<div class="sub">Three steps, one code, real POL. The full rules are in <a href="/guides/how-a-hunt-works">How a hunt works</a>.</div>
|
||||
<div class="steps">
|
||||
<div class="step"><b>Pick a mission</b> on your board. Each one names a site and what to find there.</div>
|
||||
<div class="step"><b>Go find it.</b> Spend the time on the site. Your personal code appears when you have, somewhere on the page.</div>
|
||||
@@ -71,12 +72,12 @@
|
||||
<div class="ledger" id="recent"><div class="row"><span class="site">Loading…</span></div></div>
|
||||
</section>
|
||||
|
||||
<div class="adslot" data-ad="home-footer"><!-- nas: 468x60 on phones, 728x90 on wider screens --><script>(function(){var m=window.innerWidth<600;document.write('<scr'+'ipt src="https://www.networkadspace.com/showadss.php?'+(m?'w=468&h=60&n=1&bw=468&bh=60':'w=728&h=90&n=1&bw=728&bh=90')+'&c=999"></scr'+'ipt>');})();</script></div>
|
||||
<div class="adslot" data-nas data-ad="home-footer"><!-- nas: 468x60 on phones, 728x90 on wider screens; framed by /nas.js so a dead ad server never blocks the page --></div>
|
||||
|
||||
<footer class="foot">
|
||||
PolHunter rewards completed missions. Rewards are not income and are not guaranteed; the daily pool is limited, and when it is spent claims close until midnight Central. Drips are random within the posted range. Cryptocurrency involves risk of loss. Hunters sign in with an InstantAdPay account; no account is created here.
|
||||
<br>PolHunter is part of the InstantAdPay network, the Polygon wing of the <a href="https://cryptoteambuild.com" target="_blank" rel="noopener">Crypto Team Build Network</a>.
|
||||
<br><a href="https://instantadpay.com">InstantAdPay</a> · <a href="/admin" rel="nofollow" style="color:var(--dim)">·</a>
|
||||
<br>© 2026 TrustClickz · <a href="/guides">Guides</a> · <a href="/terms">Terms</a> · <a href="/disclaimer">Rewards disclaimer</a> · <a href="/privacy">Privacy</a> · <a href="https://instantadpay.com/support" rel="noopener">Support</a> · <a href="https://instantadpay.com">InstantAdPay</a> · <a href="/admin" rel="nofollow" style="color:var(--dim)">·</a>
|
||||
</footer>
|
||||
</div>
|
||||
<script>
|
||||
@@ -114,5 +115,6 @@
|
||||
document.querySelectorAll('a[href="https://instantadpay.com/api/my/polhunter"]').forEach(function (a) { if (r) a.href = a.href + '?ref=' + encodeURIComponent(r); });
|
||||
if (framed) document.querySelectorAll('a[href^="http"]').forEach(function (a) { if (a.host !== location.host) { a.target = '_blank'; a.rel = 'noopener'; } });
|
||||
})();</script>
|
||||
<script src="/nas.js?v=20261024" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+5
-4
@@ -14,7 +14,7 @@
|
||||
<nav class="nav">
|
||||
<a class="btn pol sm" href="https://instantadpay.com/my" title="Back to your InstantAdPay dashboard">← InstantAdPay</a>
|
||||
<a class="btn ghost sm" href="/promo">Promo tools</a>
|
||||
<a class="btn ghost sm" href="/#how">How it works</a>
|
||||
<a class="btn ghost sm" href="/guides">Guides</a>
|
||||
<a class="btn sm" href="https://instantadpay.com/api/my/polhunter">Open my board</a>
|
||||
</nav>
|
||||
</header>
|
||||
@@ -41,9 +41,9 @@
|
||||
<div class="badge-strip" id="badges"></div>
|
||||
</section>
|
||||
|
||||
<div class="adslot" data-ad="leaders"><!-- nas: 468x60 on phones, 728x90 on wider screens --><script>(function(){var m=window.innerWidth<600;document.write('<scr'+'ipt src="https://www.networkadspace.com/showadss.php?'+(m?'w=468&h=60&n=1&bw=468&bh=60':'w=728&h=90&n=1&bw=728&bh=90')+'&c=999"></scr'+'ipt>');})();</script></div>
|
||||
<div class="adslot" data-nas data-ad="leaders"><!-- nas: 468x60 on phones, 728x90 on wider screens; framed by /nas.js so a dead ad server never blocks the page --></div>
|
||||
|
||||
<footer class="foot">PolHunter rewards completed missions. Rewards are not income and are not guaranteed. Cryptocurrency involves risk of loss. <br><a href="https://instantadpay.com">InstantAdPay</a></footer>
|
||||
<footer class="foot">PolHunter rewards completed missions. Rewards are not income and are not guaranteed. Cryptocurrency involves risk of loss. <br>© 2026 TrustClickz · <a href="/guides">Guides</a> · <a href="/terms">Terms</a> · <a href="/disclaimer">Rewards disclaimer</a> · <a href="/privacy">Privacy</a> · <a href="https://instantadpay.com/support" rel="noopener">Support</a> · <a href="https://instantadpay.com">InstantAdPay</a></footer>
|
||||
</div>
|
||||
<script>
|
||||
(async () => {
|
||||
@@ -60,7 +60,7 @@
|
||||
}
|
||||
document.querySelectorAll('.tab').forEach(t => t.addEventListener('click', () => show(t.dataset.p)));
|
||||
try { const pz = await (await fetch('/api/prizes')).json(); const pol = pz.rules.pol;
|
||||
document.getElementById('prizes').innerHTML = '<b>Weekly prizes:</b> ' + pol.map((v, i) => medal(i + 1) + ' ' + v + ' POL').join(' \u00b7 ') + ' for the top ' + pol.length + ' with ' + pz.rules.minFinds + '+ finds. Paid to your wallet Monday after midnight Central. Weekly #1 also earns the Top Hunter badge.';
|
||||
document.getElementById('prizes').innerHTML = '<b>Weekly prizes:</b> ' + pol.map((v, i) => medal(i + 1) + ' ' + v + ' POL').join(' \u00b7 ') + ' for the top ' + pol.length + ' <b>Game Pass holders</b> with ' + pz.rules.minFinds + '+ finds. <b>You need an active Game Pass when the week ends (Sunday midnight Central) to win a prize.</b> Without one you still appear on the board, but the prize goes to the next Pass holder. Paid to your wallet Monday after midnight Central. Weekly #1 also earns the Top Hunter badge. <a href="https://instantadpay.com/my#passes" target="_blank" rel="noopener">Get a Game Pass</a>';
|
||||
if (pz.last && pz.last.winners.length) { document.getElementById('winners').style.display = 'block'; document.getElementById('winsub').textContent = 'Week of ' + pz.last.week + '.'; document.getElementById('winrows').innerHTML = pz.last.winners.map(w => '<div class="row lb"><span><b class="num">' + medal(w.rank) + '</b> ' + esc(w.who) + '</span><span class="site">' + w.finds + ' finds</span><span class="pol">+' + w.prizePol + ' POL prize</span></div>').join(''); }
|
||||
} catch (e) {}
|
||||
const b = await (await fetch('/api/badges')).json();
|
||||
@@ -75,5 +75,6 @@
|
||||
document.querySelectorAll('a[href="https://instantadpay.com/api/my/polhunter"]').forEach(function (a) { if (r) a.href = a.href + '?ref=' + encodeURIComponent(r); });
|
||||
if (framed) document.querySelectorAll('a[href^="http"]').forEach(function (a) { if (a.host !== location.host) { a.target = '_blank'; a.rel = 'noopener'; } });
|
||||
})();</script>
|
||||
<script src="/nas.js?v=20261024" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
// NAS banner slots (2026-10-24): each ad loads inside its own frame, so a slow or offline ad server (networkadspace.com
|
||||
// sits on the rhi box) can only blank its own box. The old inline document.write script blocked the page below it,
|
||||
// and PolHunter stopped loading halfway during the 10-24 data-center move.
|
||||
(function () {
|
||||
function fill(el) {
|
||||
var m = window.innerWidth < 600, w = m ? 468 : 728, h = m ? 60 : 90;
|
||||
var src = 'https://www.networkadspace.com/showadss.php?w=' + w + '&h=' + h + '&n=1&bw=' + w + '&bh=' + h + '&c=999';
|
||||
var f = document.createElement('iframe');
|
||||
f.width = w; f.height = h; f.title = 'Advertisement'; f.loading = 'lazy';
|
||||
f.setAttribute('scrolling', 'no');
|
||||
f.style.cssText = 'border:0;max-width:100%;display:block;margin:0 auto;background:transparent';
|
||||
f.srcdoc = '<!doctype html><html><head><base target="_blank"><style>html,body{margin:0;padding:0;overflow:hidden;background:transparent}</style></head><body><script src="' + src + '"><\/script></body></html>';
|
||||
el.appendChild(f);
|
||||
}
|
||||
function run() { var s = document.querySelectorAll('[data-nas]'); for (var i = 0; i < s.length; i++) fill(s[i]); }
|
||||
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', run); else run();
|
||||
})();
|
||||
@@ -0,0 +1,29 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Privacy Policy · PolHunter</title>
|
||||
<meta name="description" content="What PolHunter keeps about you, why, and for how long.">
|
||||
<link rel="canonical" href="https://polhunter.com/privacy">
|
||||
<link rel="stylesheet" href="/style.css?v=12">
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
<header class="top">
|
||||
<a class="mark" href="/"><span class="coin"></span>PolHunter</a>
|
||||
<nav class="nav">
|
||||
<a class="btn ghost sm" href="/#how">How it works</a>
|
||||
<a class="btn ghost sm" href="/leaders">Leaderboard</a>
|
||||
</nav>
|
||||
</header>
|
||||
<section class="section" style="padding-top:14px">
|
||||
<div class="small">Last updated November 17, 2026</div>
|
||||
<h2>PolHunter Privacy Policy</h2>
|
||||
<div class="sub">What PolHunter keeps about you, why, and for how long.</div>
|
||||
<h3 style="margin:22px 0 6px;font-size:19px">Who we are</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">PolHunter is run by TrustClickz.</p><h3 style="margin:22px 0 6px;font-size:19px">What we keep</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">From your InstantAdPay sign-in: your member number, username, email and linked wallet, used to run your hunt and pay your drips. Your finds, rewards, badges and referrals. Payouts are public on the Polygon blockchain and in the PolHunter ledger and leaderboard, shown by username.</p><h3 style="margin:22px 0 6px;font-size:19px">Fair play checks</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">Your internet address is used to limit requests and stop abuse. It is not shown to anyone.</p><h3 style="margin:22px 0 6px;font-size:19px">Cookies</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">A sign-in cookie (30 days), a cookie that remembers who referred you (30 days), and no advertising or tracking cookies of our own.</p><h3 style="margin:22px 0 6px;font-size:19px">Who else sees data</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">The Polygon blockchain: every drip is public there, by its nature. InstantAdPay, which signs you in. Our Telegram and Discord groups, where finds, prizes and payouts can be posted with your username. Network sites that carry a mission embed. We do not sell personal data.</p><h3 style="margin:22px 0 6px;font-size:19px">Your choices</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">You can stop hunting at any time, or ask us to remove your PolHunter records. Records on the blockchain cannot be removed by anyone.</p><h3 style="margin:22px 0 6px;font-size:19px">Contact</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">Questions, problems or a request about your data: <a href="https://instantadpay.com/support" rel="noopener">network support</a> (TrustClickz).</p>
|
||||
</section>
|
||||
<footer class="foot">PolHunter rewards completed missions. Rewards are not income and are not guaranteed. Cryptocurrency involves risk of loss.<br>© 2026 TrustClickz · <a href="/terms">Terms</a> · <a href="/disclaimer">Rewards disclaimer</a> · <a href="/privacy">Privacy</a> · <a href="https://instantadpay.com/support" rel="noopener">Support</a> · <a href="https://instantadpay.com">InstantAdPay</a></footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+3
-2
@@ -71,9 +71,9 @@
|
||||
<div class="grid" id="swipes"></div>
|
||||
</section>
|
||||
|
||||
<div class="adslot" data-ad="promo"><!-- nas: 468x60 on phones, 728x90 on wider screens --><script>(function(){var m=window.innerWidth<600;document.write('<scr'+'ipt src="https://www.networkadspace.com/showadss.php?'+(m?'w=468&h=60&n=1&bw=468&bh=60':'w=728&h=90&n=1&bw=728&bh=90')+'&c=999"></scr'+'ipt>');})();</script></div>
|
||||
<div class="adslot" data-nas data-ad="promo"><!-- nas: 468x60 on phones, 728x90 on wider screens; framed by /nas.js so a dead ad server never blocks the page --></div>
|
||||
|
||||
<footer class="foot">PolHunter rewards completed missions. Rewards are not income and are not guaranteed; the daily pool is limited and drips are random within the posted range. Cryptocurrency involves risk of loss. <br><a href="https://instantadpay.com">InstantAdPay</a></footer>
|
||||
<footer class="foot">PolHunter rewards completed missions. Rewards are not income and are not guaranteed; the daily pool is limited and drips are random within the posted range. Cryptocurrency involves risk of loss. <br>© 2026 TrustClickz · <a href="/terms">Terms</a> · <a href="/disclaimer">Rewards disclaimer</a> · <a href="/privacy">Privacy</a> · <a href="https://instantadpay.com/support" rel="noopener">Support</a> · <a href="https://instantadpay.com">InstantAdPay</a></footer>
|
||||
</div>
|
||||
<script>
|
||||
(async () => {
|
||||
@@ -130,5 +130,6 @@
|
||||
document.querySelectorAll('a[href="https://instantadpay.com/api/my/polhunter"]').forEach(function (a) { if (r) a.href = a.href + '?ref=' + encodeURIComponent(r); });
|
||||
if (framed) document.querySelectorAll('a[href^="http"]').forEach(function (a) { if (a.host !== location.host) { a.target = '_blank'; a.rel = 'noopener'; } });
|
||||
})();</script>
|
||||
<script src="/nas.js?v=20261024" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -157,3 +157,10 @@ textarea{width:100%;padding:12px 14px;border-radius:12px;border:1px solid var(--
|
||||
|
||||
/* cross-promo strip (2026-10-03) */
|
||||
.moreGames{--gs-ink:var(--ink);--gs-muted:var(--muted);--gs-card:var(--glass);--gs-line:var(--edge);--gs-hot:var(--gold);--gs-font:var(--font);margin-top:12px}
|
||||
/* the Network Tour (2026-11-17): round progress on the board */
|
||||
.tour{padding:14px 18px;border-radius:16px;border:1px solid var(--edge-hi);background:rgba(130,71,229,.10)}
|
||||
.tour-hd{font-size:15px;color:var(--ink)} .tour-r{color:var(--dim);font-size:13px}
|
||||
.tour-bar{height:8px;border-radius:999px;background:rgba(255,255,255,.08);margin:10px 0 8px;overflow:hidden}
|
||||
.tour-bar i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,var(--pol-hi),var(--gold-hi))}
|
||||
.tour-left{font-size:13px;color:var(--muted);line-height:1.5}
|
||||
.tour-free{margin:10px 0 0;font-size:14px;color:var(--gold-hi)}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Terms and Conditions · PolHunter</title>
|
||||
<meta name="description" content="The rules for hunting on PolHunter, in plain English.">
|
||||
<link rel="canonical" href="https://polhunter.com/terms">
|
||||
<link rel="stylesheet" href="/style.css?v=12">
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
<header class="top">
|
||||
<a class="mark" href="/"><span class="coin"></span>PolHunter</a>
|
||||
<nav class="nav">
|
||||
<a class="btn ghost sm" href="/#how">How it works</a>
|
||||
<a class="btn ghost sm" href="/leaders">Leaderboard</a>
|
||||
</nav>
|
||||
</header>
|
||||
<section class="section" style="padding-top:14px">
|
||||
<div class="small">Last updated November 17, 2026</div>
|
||||
<h2>PolHunter Terms and Conditions</h2>
|
||||
<div class="sub">The rules for hunting on PolHunter, in plain English.</div>
|
||||
<h3 style="margin:22px 0 6px;font-size:19px">Who we are</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">PolHunter (polhunter.com) is run by TrustClickz. It is a game in the InstantAdPay network. By using PolHunter you agree to these terms.</p><h3 style="margin:22px 0 6px;font-size:19px">What PolHunter is</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">PolHunter is a scavenger hunt across network websites. A mission sends you to a page where a code is hidden; you find the code and enter it here. A correct find can pay a small drip of POL on Polygon from the PolHunter reward wallet.</p><h3 style="margin:22px 0 6px;font-size:19px">Your account</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">You sign in with your InstantAdPay account. No separate account is created here. Drips go to the wallet linked to your InstantAdPay account. You must be old enough to make a binding agreement where you live, and using crypto must be legal there.</p><h3 style="margin:22px 0 6px;font-size:19px">How rewards work</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">Each mission can be found once per Central day. A free InstantAdPay account can claim a limited number of finds a day at a smaller drip; Game Pass holders get more finds a day, the weekly prizes and the Mystery Hunt Box. Drips are random within the range shown on the site. The daily pool is limited: when it is spent, claims close until midnight Central or are paid on a later day. Referral rewards, when offered, are paid to the referrer from their own limited pool and only for new members.</p><h3 style="margin:22px 0 6px;font-size:19px">Nothing is promised</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">Rewards are not income, wages, an investment or a promise of any payment. We may change the drip range, the number of finds, the pools, the missions or the prizes at any time. Read the <a href="/disclaimer">Rewards disclaimer</a>.</p><h3 style="margin:22px 0 6px;font-size:19px">Fair play</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">One person, one account. Two accounts sharing a wallet get one drip per mission per day between them. Bots, scripts, shared or traded codes, multiple accounts and faked visits are not allowed. We may refuse, hold or reverse a reward we judge not to be fair play, and close the account behind it.</p><h3 style="margin:22px 0 6px;font-size:19px">Crypto risk</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">The price of POL moves. The dollar value of a drip can be higher or lower later. Blockchain transactions are final. You are responsible for your wallet and its recovery phrase; never share it with anyone. We will never ask for it.</p><h3 style="margin:22px 0 6px;font-size:19px">Other sites</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">Missions send you to network and partner websites run under their own terms. We are not responsible for third-party websites.</p><h3 style="margin:22px 0 6px;font-size:19px">The service</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">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. Changes to these terms apply from the date they are posted here.</p><h3 style="margin:22px 0 6px;font-size:19px">Limits</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">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, or events outside our control. These terms are governed by the laws of the State of Alabama, USA.</p><h3 style="margin:22px 0 6px;font-size:19px">Contact</h3><p style="margin:0 0 12px;max-width:70ch;line-height:1.65">Questions, problems or a request about your data: <a href="https://instantadpay.com/support" rel="noopener">network support</a> (TrustClickz).</p>
|
||||
</section>
|
||||
<footer class="foot">PolHunter rewards completed missions. Rewards are not income and are not guaranteed. Cryptocurrency involves risk of loss.<br>© 2026 TrustClickz · <a href="/terms">Terms</a> · <a href="/disclaimer">Rewards disclaimer</a> · <a href="/privacy">Privacy</a> · <a href="https://instantadpay.com/support" rel="noopener">Support</a> · <a href="https://instantadpay.com">InstantAdPay</a></footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -53,6 +53,13 @@ const IAP_URL = String(process.env.IAP_URL || 'https://instantadpay.com').replac
|
||||
gp.use({ game: 'polhunter', secret: String(process.env.HUNT_SSO_SECRET || '').trim(), iap: IAP_URL, store, notify: (kind, p) => notify(kind, p) });
|
||||
const passActive = me => !!(gp.on() && me && gp.passOf(me.memberId, me.email).active);
|
||||
const passExtra = me => passActive(me) ? 2 : 0; // the perk: 5 missions a day instead of 3
|
||||
// the full tier (Marty 2026-11-02): Game Pass holders get the full allotment, the full draw, the weekly prizes and the Mystery Box;
|
||||
// a free account gets the free tier (lib/rewards.js freeMissionsPerDay / freeMinPol / freeMaxPol). With GAMEPASS off there is no
|
||||
// pass to buy, so everyone stays on the full tier as before.
|
||||
const fullTier = me => !gp.on() || passActive(me);
|
||||
// the Network Tour (Marty 2026-11-17, lib/rotation.js): rounds per hunter; a free member's repeat find is a tour stop (ad credits, no POL)
|
||||
const rotation = require('./lib/rotation');
|
||||
const isTourStop = (me, m) => !fullTier(me) && !m.paid && rotation.everFound(me.memberId, me.wallet, m.id);
|
||||
// one reward through IAP: ask(pol, ref) -> IAP's answer (+ the player-facing note), wait(rowId, pol, ref) -> queue the ref (fail closed)
|
||||
const gpGate = me => ({
|
||||
ask: async (pol, ref) => { const r = await gp.grant({ memberId: me.memberId, email: me.email, kind: 'daily', pol, ref }); r.note = gp.note(r, 'daily', pol); return r; },
|
||||
@@ -124,7 +131,7 @@ async function postBadge(p) {
|
||||
return false;
|
||||
}
|
||||
// Marty's rule (2026-09-19): when the day's pool is spent, say so; claims reopen at midnight Central
|
||||
const dailyMsg = d => 'That is your ' + (['', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight'][d.limit] || d.limit) + ' for today. Fresh missions at midnight Central.';
|
||||
const dailyMsg = d => 'That is your ' + (['', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight'][d.limit] || d.limit) + ' for today. Fresh missions at midnight Central.' + (d.pass ? '' : ' Game Pass holders hunt five a day at the full reward.'); // free tier since 2026-11-02
|
||||
const SPENT_MSG = 'Today\u2019s POL pool is spent. No more claims today. Claims reopen at midnight Central.';
|
||||
function refOf(req) { const m = /(?:^|;\s*)ph\.ref=([^;]+)/.exec(req.headers.cookie || ''); const r = m ? decodeURIComponent(m[1]) : ''; return /^[A-Za-z0-9_.-]{1,40}$/.test(r) ? r : null; }
|
||||
function explorer() { return Number(process.env.HUNT_CHAIN_ID) === 80002 ? 'https://amoy.polygonscan.com' : 'https://polygonscan.com'; }
|
||||
@@ -266,6 +273,18 @@ const server = http.createServer(async (req, res) => {
|
||||
if (p === '/api/prizes') return json(res, 200, social.prizes(), { 'Cache-Control': 'public, max-age=60' });
|
||||
if (p === '/leaders') return sendFile(res, path.join(PUBLIC_DIR, 'leaders.html'));
|
||||
if (p === '/promo') return sendFile(res, path.join(PUBLIC_DIR, 'promo.html'));
|
||||
if (p === '/terms' || p === '/privacy' || p === '/disclaimer') return sendFile(res, path.join(PUBLIC_DIR, p.slice(1) + '.html')); // legal pages (2026-11-17)
|
||||
// evergreen Guides (Marty 2026-11-17): /guides and four pages, static files in public/guides
|
||||
const GUIDES = ['how-a-hunt-works', 'is-polhunter-legit', 'free-account', 'faq'];
|
||||
if (p === '/guides' || p === '/guides/') return sendFile(res, path.join(PUBLIC_DIR, 'guides', 'index.html'));
|
||||
{ const gm = /^\/guides\/([a-z-]+)\/?$/.exec(p); if (gm && GUIDES.includes(gm[1])) return sendFile(res, path.join(PUBLIC_DIR, 'guides', gm[1] + '.html')); }
|
||||
if (p === '/sitemap.xml') { // the public pages (2026-11-17)
|
||||
const day = new Date().toISOString().slice(0, 10);
|
||||
const urls = ['/', '/leaders', '/promo', '/guides', ...GUIDES.map(g => '/guides/' + g), '/terms', '/disclaimer', '/privacy'].map(x => '<url><loc>' + SITE + x + '</loc><lastmod>' + day + '</lastmod></url>').join('');
|
||||
res.writeHead(200, Object.assign({ 'Content-Type': 'application/xml; charset=utf-8', 'Cache-Control': 'public, max-age=3600' }, SEC));
|
||||
return res.end('<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' + urls + '</urlset>');
|
||||
}
|
||||
if (p === '/robots.txt') { res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8', 'Cache-Control': 'public, max-age=3600' }); return res.end('User-agent: *\nDisallow: /app\nDisallow: /admin\nSitemap: ' + SITE + '/sitemap.xml\n'); }
|
||||
if (p === '/api/ledger') { const t = rewards.totals(); return json(res, 200, { totals: t, referrals: referrals.totals(), pools: { finds: rewards.pool(), referral: referrals.refPool() }, recent: rewards.ledger(30).map(x => ({ who: x.username ? '@' + x.username : '#' + x.memberId, site: x.site, pol: x.pol, tx: x.tx, at: x.paidAt })) }); }
|
||||
|
||||
// ---- hunter (session required)
|
||||
@@ -275,18 +294,24 @@ const server = http.createServer(async (req, res) => {
|
||||
const fbank = await fbFor(me);
|
||||
if (gp.on()) gp.fetchPass(me.memberId, me.email).catch(() => {}); // keep the Game Pass flag fresh (display + perks; grant answers carry the truth)
|
||||
referrals.seen(me); // hunters already signed in never pass through /auth again, so keep the directory fresh here too
|
||||
const done = rewards.doneToday(me.memberId, me.wallet); const wdone = done; // today's finds, by member id or wallet
|
||||
return json(res, 200, { me: { memberId: me.memberId, username: me.username, wallet: me.wallet }, missions: missions.forMember(me.memberId).map(m => Object.assign(pubMission(m), { done: done.has(m.id) || wdone.has(m.id) })), drips: rewards.mine(me.memberId).slice(0, 20), faucet: { on: faucetOn }, pool: rewards.pool(), daily: rewards.daily(me.memberId, rewards.doneToday(me.memberId, me.wallet), fbank.bonus, passExtra(me)), fridayBank: fbank, gamepass: gp.view(me.memberId, me.email),
|
||||
badges: social.badgesFor(me.memberId), badgeCards: (() => { const got = new Set(social.badgesFor(me.memberId).map(b => b.id)); const who = social.nameOf(me); return social.BADGES.map(b => ({ id: b.id, name: b.name, icon: b.icon, why: b.why, art: '/badges/badge-' + b.id + '.jpg', earned: got.has(b.id), page: got.has(b.id) ? SITE + '/b/' + who + '/' + b.id : null, image: got.has(b.id) ? SITE + '/badge-img/' + who + '/' + b.id + '.jpg' : null })); })(), rank: { week: social.rankOf(me.memberId, 'week'), month: social.rankOf(me.memberId, 'month'), all: social.rankOf(me.memberId, 'all') },
|
||||
const done = rewards.doneToday(me.memberId, me.wallet); // today's finds, by member id or wallet
|
||||
// the Network Tour: open this round first (never visited, then least recently found), then today's finds marked done
|
||||
const rot = rotation.state(me), free = !fullTier(me), rc = rotation.cfg();
|
||||
const offered = rotation.order(me, rot).filter(m => !done.has(m.id)), doneList = missions.forMember(me.memberId).filter(m => done.has(m.id));
|
||||
const boardMissions = offered.concat(doneList).map(m => Object.assign(pubMission(m), { done: done.has(m.id), fresh: !m.paid && !rot.last.has(m.id), tourStop: free && !m.paid && rot.last.has(m.id) ? { credits: rc.credits } : undefined }));
|
||||
const tour = { on: rot.on, round: rot.round, rounds: rot.rounds, done: rot.done, total: rot.total, left: [...new Set(rot.left.map(m => m.site))], toured: rot.toured, free, tourStopCredits: rc.credits };
|
||||
return json(res, 200, { me: { memberId: me.memberId, username: me.username, wallet: me.wallet }, missions: boardMissions, tour, drips: rewards.mine(me.memberId).slice(0, 20), faucet: { on: faucetOn }, pool: rewards.pool(), daily: rewards.daily(me.memberId, rewards.doneToday(me.memberId, me.wallet), fbank.bonus, passExtra(me), fullTier(me)), /* the tier, as start/submit pass it (the board showed a Pass holder 3, not 5) */ fridayBank: fbank, gamepass: gp.view(me.memberId, me.email),
|
||||
badges: social.badgesFor(me.memberId), badgeCards: (() => { const got = new Set(social.badgesFor(me.memberId).map(b => b.id)); const who = social.nameOf(me); return social.BADGES.map(b => ({ id: b.id, name: b.name, icon: b.icon, why: b.why, count: b.id === 'sweep' && rot.rounds > 1 ? rot.rounds : undefined, art: '/badges/badge-' + b.id + '.jpg', earned: got.has(b.id), page: got.has(b.id) ? SITE + '/b/' + who + '/' + b.id : null, image: got.has(b.id) ? SITE + '/badge-img/' + who + '/' + b.id + '.jpg' : null })); })(), rank: { week: social.rankOf(me.memberId, 'week'), month: social.rankOf(me.memberId, 'month'), all: social.rankOf(me.memberId, 'all') },
|
||||
share: { link: social.shareLink(SITE, me), joinUrl: 'https://instantadpay.com/join/' + encodeURIComponent(String(me.username || me.memberId)) + '?from=polhunter' },
|
||||
referral: referrals.state(me), box: detective.view(me) });
|
||||
referral: referrals.state(me), box: detective.view(me, fullTier(me)) });
|
||||
}
|
||||
if (p === '/api/my/start' && req.method === 'POST') {
|
||||
const b = await readBody(req); const m = missions.get(String(b.missionId || '')); if (!m || !m.active) return json(res, 404, { error: 'That mission is not open.' });
|
||||
if (!me.wallet) return json(res, 400, { error: 'Link a wallet on InstantAdPay first so the drip has somewhere to land, then open PolHunter again.' });
|
||||
if (rewards.completed(me.memberId, m.id, me.wallet)) return json(res, 400, { error: 'You already completed this one.' });
|
||||
if (rotation.blocked(me, m)) return json(res, 400, { error: 'You found this one already this round. The rest of the network tour comes first.', tour: true });
|
||||
{ const pool = rewards.pool(); if (pool.spent) return json(res, 400, { error: SPENT_MSG, spent: true, resetsAt: pool.resetsAt }); }
|
||||
{ const fb = await fbFor(me); const d = rewards.daily(me.memberId, rewards.doneToday(me.memberId, me.wallet), fb.bonus, passExtra(me)); if (!d.left) return json(res, 400, { error: dailyMsg(d), dailyDone: true, resetsAt: rewards.pool().resetsAt }); }
|
||||
{ const fb = await fbFor(me); const d = rewards.daily(me.memberId, rewards.doneToday(me.memberId, me.wallet), fb.bonus, passExtra(me), fullTier(me)); if (!d.left) return json(res, 400, { error: dailyMsg(d), dailyDone: true, resetsAt: rewards.pool().resetsAt }); }
|
||||
if (limited('start:' + me.memberId, 20, 3600000)) return json(res, 429, { error: 'Easy. Twenty starts an hour is plenty.' });
|
||||
const t = missions.issue(me.memberId, m.id);
|
||||
// a mission URL may place the token itself with {token} (a Telegram Mini App takes it in
|
||||
@@ -302,27 +327,40 @@ const server = http.createServer(async (req, res) => {
|
||||
const m = missions.get(c.rec.missionId); if (!m) return json(res, 404, { error: 'That mission is gone.' });
|
||||
if (rewards.completed(me.memberId, m.id, me.wallet)) return json(res, 400, { error: 'You already completed this one.' });
|
||||
{ const pool = rewards.pool(); if (pool.spent) return json(res, 400, { error: SPENT_MSG, spent: true, resetsAt: pool.resetsAt }); }
|
||||
{ const fb = await fbFor(me); const d = rewards.daily(me.memberId, rewards.doneToday(me.memberId, me.wallet), fb.bonus, passExtra(me)); if (!d.left) return json(res, 400, { error: dailyMsg(d), dailyDone: true, resetsAt: rewards.pool().resetsAt }); }
|
||||
const before = new Set(social.badgesFor(me.memberId).map(b => b.id));
|
||||
{ const fb = await fbFor(me); const d = rewards.daily(me.memberId, rewards.doneToday(me.memberId, me.wallet), fb.bonus, passExtra(me), fullTier(me)); if (!d.left) return json(res, 400, { error: dailyMsg(d), dailyDone: true, resetsAt: rewards.pool().resetsAt }); }
|
||||
const before = new Set(social.badgesFor(me.memberId).map(b => b.id)); const roundsBefore = rotation.state(me).rounds;
|
||||
// a free member's repeat find (Marty 2026-11-17): a tour stop, ad credits instead of POL; counts as the day's hunt and for the tour
|
||||
if (isTourStop(me, m)) {
|
||||
const row = rotation.tourStop(me, m); const roundsNow = rotation.state(me).rounds;
|
||||
const unlocked = social.badgesFor(me.memberId).filter(b => !before.has(b.id));
|
||||
for (const b of unlocked) notify('badge', { me, id: b.id }).catch(() => {});
|
||||
const show = unlocked.map(b => b.id); if (roundsNow > roundsBefore && !show.includes('sweep')) show.push('sweep'); // a new round closed: celebrate again
|
||||
rotation.deliver(row, gp).catch(e => console.error('tour stop', e.message)); // signed call to InstantAdPay; owed and retried if it fails
|
||||
const cr = row.tourStop.credits;
|
||||
return json(res, 200, { ok: true, pol: 0, tourStop: { credits: cr }, unlocked: show, round: roundsNow > roundsBefore ? roundsNow : null, gamepass: gp.view(me.memberId, me.email),
|
||||
message: 'Tour stop logged. ' + (cr > 0 ? '+' + cr + ' ad credits are on their way to your InstantAdPay account.' : 'Today\u2019s tour-stop ad credits are already yours.') + ' New sites pay POL on your first find, and the Game Pass pays POL on every hunt.' });
|
||||
}
|
||||
let g, note = null;
|
||||
if (gp.on() && !m.paid) { // the Game Pass: IAP's account-wide daily cap first (a paid mission is the advertiser's money, not gated)
|
||||
const quote = rewards.quote(m), ref = 'find:' + m.id + ':' + missions.ctDay(), r = await gpGate(me).ask(quote, ref); note = r.note;
|
||||
const quote = rewards.quote(m, fullTier(me)), ref = 'find:' + m.id + ':' + missions.ctDay(), r = await gpGate(me).ask(quote, ref); note = r.note;
|
||||
if (r.retry) { g = rewards.grant(me, m, { pol: quote, status: 'gp-wait', nominal: quote, gp: { ref, kind: 'daily', nominal: quote, pending: true } }); if (!g.error) gpGate(me).wait(g.rec.id, quote, ref); }
|
||||
else g = rewards.grant(me, m, { pol: r.allowed, nominal: quote, gp: { ref, kind: 'daily', nominal: quote, pass: !!r.pass, capHit: r.capHit || null } });
|
||||
} else g = rewards.grant(me, m);
|
||||
} else g = rewards.grant(me, m, { pass: fullTier(me) });
|
||||
if (g.error) return json(res, 400, g);
|
||||
// whoever brought this hunter gets paid for it: the bounty on their first find, a match while they are new
|
||||
let refDrips = [];
|
||||
try { refDrips = referrals.onFind(me, g.rec); } catch (e) { console.error('referral', e.message); }
|
||||
for (const d of refDrips) if (d.ref.kind === 'bounty' || d.ref.kind === 'first-bonus') notify(d.ref.kind === 'bounty' ? 'referral' : 'firstbonus', { drip: d }).catch(() => {});
|
||||
// achievements unlocked by this find: told to the board, posted to Telegram (gated)
|
||||
const roundsNow = rotation.state(me).rounds;
|
||||
const unlocked = social.badgesFor(me.memberId).filter(b => !before.has(b.id));
|
||||
for (const b of unlocked) notify('badge', { me, id: b.id }).catch(() => {});
|
||||
return json(res, 200, { ok: true, pol: g.waiting ? 0 : g.rec.pol, nominal: g.rec.nominal, queued: g.queued, capped: g.capped, waiting: g.waiting, note, unlocked: unlocked.map(b => b.id), gamepass: gp.view(me.memberId, me.email),
|
||||
const show = unlocked.map(b => b.id); if (roundsNow > roundsBefore && !show.includes('sweep')) show.push('sweep'); // Full Network Tour again: board only, Telegram posts a badge once
|
||||
return json(res, 200, { ok: true, pol: g.waiting ? 0 : g.rec.pol, nominal: g.rec.nominal, queued: g.queued, capped: g.capped, waiting: g.waiting, note, unlocked: show, round: roundsNow > roundsBefore ? roundsNow : null, gamepass: gp.view(me.memberId, me.email),
|
||||
message: g.waiting ? 'Found it. ' + note : g.capped ? 'Found it. ' + note : g.queued ? 'Found it. Today’s POL is spoken for, so yours is queued and pays out next.' : 'Found it. ' + fmt(g.rec.pol) + ' POL is on its way to your wallet.' + (note ? ' ' + note : '') });
|
||||
}
|
||||
// ---- Mystery Hunt Box + Ad Detective
|
||||
if (p === '/api/my/box/open' && req.method === 'POST') { const r = detective.open(me, passActive(me)); return json(res, r.error ? 400 : 200, r.error ? r : { ok: true, box: detective.view(me) }); } // pass: a second case a day
|
||||
if (p === '/api/my/box/open' && req.method === 'POST') { const r = detective.open(me, passActive(me), fullTier(me)); return json(res, r.error ? 400 : 200, r.error ? r : { ok: true, box: detective.view(me, fullTier(me)) }); } // pass: a second case a day
|
||||
if (p === '/api/my/box/start' && req.method === 'POST') {
|
||||
if (!me.wallet) return json(res, 400, { error: 'Link a wallet on InstantAdPay first so the reward has somewhere to land.' });
|
||||
if (limited('boxstart:' + me.memberId, 20, 3600000)) return json(res, 429, { error: 'Easy. Try again in a little while.' });
|
||||
@@ -336,7 +374,7 @@ const server = http.createServer(async (req, res) => {
|
||||
const unlocked = r.correct ? social.badgesFor(me.memberId).filter(x => !before.has(x.id)) : [];
|
||||
for (const x of unlocked) notify('badge', { me, id: x.id }).catch(() => {});
|
||||
const msg = r.correct ? (r.queued ? 'Case solved. Today\u2019s POL is spoken for, so your ' + fmt(r.pol) + ' POL is queued and pays out next.' : 'Case solved. ' + fmt(r.pol) + ' POL is on its way to your wallet.') : 'Not this time. The answer was: ' + r.answer + '. A new box unlocks tomorrow.';
|
||||
return json(res, 200, { ok: true, correct: r.correct, pol: r.pol, nominal: r.nominal, queued: r.queued, capped: r.capped, waiting: r.waiting, note: r.note || null, unlocked: unlocked.map(x => x.id), message: msg + (r.note ? ' ' + r.note : ''), box: detective.view(me), gamepass: gp.view(me.memberId, me.email) });
|
||||
return json(res, 200, { ok: true, correct: r.correct, pol: r.pol, nominal: r.nominal, queued: r.queued, capped: r.capped, waiting: r.waiting, note: r.note || null, unlocked: unlocked.map(x => x.id), message: msg + (r.note ? ' ' + r.note : ''), box: detective.view(me, fullTier(me)), gamepass: gp.view(me.memberId, me.email) });
|
||||
}
|
||||
return json(res, 404, { error: 'No such call.' });
|
||||
}
|
||||
@@ -355,10 +393,13 @@ const server = http.createServer(async (req, res) => {
|
||||
return json(res, 200, { ok: true, missions: missions.list() });
|
||||
}
|
||||
if (p === '/api/admin/mission' && req.method === 'DELETE') { const b = await readBody(req); missions.remove(String(b.id || '')); return json(res, 200, { ok: true, missions: missions.list() }); }
|
||||
if (p === '/api/admin/settings' && req.method === 'POST') { const b = await readBody(req); const patch = {}; for (const k of ['minPol', 'maxPol', 'dailyCapPol', 'lowBalancePol', 'weeklyMinFinds', 'drawSkew', 'missionsPerDay', 'detectiveOn', 'detectivePol', 'refEnabled', 'refBountyPol', 'refMatchPct', 'refMatchDays', 'refNewDays', 'refCapPol', 'refMatchMinPol']) if (b[k] != null && Number(b[k]) >= 0) patch[k] = Number(b[k]); for (const k of ['weeklyPrizes', 'leaderboardExclude']) if (Array.isArray(b[k])) patch[k] = b[k].map(Number).filter(n => n >= 0); return json(res, 200, { ok: true, settings: rewards.setSettings(patch) }); }
|
||||
if (p === '/api/admin/settings' && req.method === 'POST') { const b = await readBody(req); const patch = {}; for (const k of ['minPol', 'maxPol', 'dailyCapPol', 'lowBalancePol', 'weeklyMinFinds', 'drawSkew', 'missionsPerDay', 'freeMissionsPerDay', 'freeMinPol', 'freeMaxPol', 'detectiveOn', 'detectivePol', 'refEnabled', 'refBountyPol', 'refMatchPct', 'refMatchDays', 'refNewDays', 'refCapPol', 'refMatchMinPol', 'rotationOn', 'tourStopCredits', 'tourStopCreditsDailyMax']) if (b[k] != null && Number(b[k]) >= 0) patch[k] = Number(b[k]); for (const k of ['weeklyPrizes', 'leaderboardExclude']) if (Array.isArray(b[k])) patch[k] = b[k].map(Number).filter(n => n >= 0); return json(res, 200, { ok: true, settings: rewards.setSettings(patch) }); }
|
||||
// award a week by hand (its Monday key); already-awarded weeks are skipped
|
||||
if (p === '/api/admin/prizes/award' && req.method === 'POST') { const b = await readBody(req); const r = social.awardWeek(String(b.week || '')); if (r && r.winners && r.winners.length) notify('prize', r).catch(() => {}); return json(res, r && r.error ? 400 : 200, r); }
|
||||
// one-time catch-up for an already-awarded week (2026-11-23), ignoring the Pass: pays the places that went unpaid, never anyone twice
|
||||
if (p === '/api/admin/prizes/fill' && req.method === 'POST') { const b = await readBody(req); const r = social.awardFill(String(b.week || '')); if (r && r.winners && r.winners.length) notify('prize', r).catch(() => {}); return json(res, r && r.error ? 400 : 200, r); }
|
||||
// Ad Detective question bank: stats per question, add or edit one, retire or restore one
|
||||
if (p === '/api/admin/rotation') return json(res, 200, rotation.adminView()); // the Network Tour: rounds per hunter, tour-stop credits sent / owed
|
||||
if (p === '/api/admin/detective') return json(res, 200, detective.stats());
|
||||
if (p === '/api/admin/detective/question' && req.method === 'POST') { const b = await readBody(req); if (b.id && b.active != null && !b.q) return json(res, detective.setActive(String(b.id), !!b.active) ? 200 : 404, { ok: true }); const r = detective.saveQuestion(b); return json(res, r.error ? 400 : 200, r); }
|
||||
if (p === '/api/admin/drip/retry' && req.method === 'POST') { const b = await readBody(req); rewards.mark(String(b.id || ''), { status: 'due', error: null }); return json(res, 200, { ok: true }); }
|
||||
@@ -385,6 +426,8 @@ if (faucetOn) setInterval(() => faucet.tick(notify).catch(e => console.error('fa
|
||||
// Game Pass: refs that could not reach InstantAdPay retry every 5 minutes (lib/polgrant.js); the weekly Pass Tournament prizes are
|
||||
// paid from this faucet every 10 minutes (lib/tournament.js). Both are inert unless GAMEPASS=on; prizes need the faucet wallet too.
|
||||
gp.startRetry(payQueued); if (faucetOn) tournament.start();
|
||||
// tour-stop ad credits InstantAdPay has not confirmed yet are retried every two minutes (owed until then)
|
||||
setInterval(() => { if (gp.on()) rotation.retryDue(gp).catch(e => console.error('tour stops', e.message)); }, 2 * 60000);
|
||||
// Every completed mission reaches Telegram (Marty, 2026-09-21): a find is posted when its drip is paid, and
|
||||
// this sweep posts any paid find that is not marked posted yet (the pre-live gate, Telegram down, a restart).
|
||||
// Only finds made after HUNT_POST_SINCE count, so rehearsal drips from before the doors opened stay quiet.
|
||||
@@ -413,6 +456,6 @@ async function postMissedBadges() {
|
||||
}
|
||||
setInterval(() => postMissedFinds().catch(() => {}), 2 * 60000); setTimeout(() => postMissedFinds().catch(() => {}), 20000);
|
||||
// weekly prizes: the week that just ended is awarded on the first tick after Sunday, Central
|
||||
setInterval(() => { try { social.awardDue(notify); } catch (e) { console.error('prizes', e.message); } }, 2 * 60000);
|
||||
setInterval(() => { Promise.resolve().then(() => social.awardDue(notify)).catch(e => console.error('prizes', e.message)); }, 2 * 60000);
|
||||
|
||||
server.listen(PORT, () => console.log(`PolHunter on :${PORT} — outbound: ${outbound() ? 'ON' : 'OFF'} — sign-ups: ${signupsOpen() ? 'open' : 'CLOSED'} — curtain: ${CURTAIN ? 'up' : 'down'} — sso: ${sso.enabled() ? 'on' : 'off'} — faucet: ${faucetOn ? faucet.address() + ' chain ' + (process.env.HUNT_CHAIN_ID || '?') : 'off'}`));
|
||||
|
||||
+5
-3
@@ -56,19 +56,21 @@ const ok = (name, cond, info) => { if (cond) { pass++; console.log(' ok ', nam
|
||||
rewards.setSettings({ minPol: 0.05, maxPol: 1, dailyCapPol: 20, missionsPerDay: 3 });
|
||||
const me = { memberId: 7, email: 'hugh@example.com', username: 'hugh', wallet: '0x' + 'a'.repeat(40) }, day = missions.ctDay();
|
||||
const m1 = { id: 'm1', site: 'example.com' }, m2 = { id: 'm2', site: 'two.com' }, mpaid = { id: 'adv', site: 'adv.com', paid: true, hunterPol: 0.2 };
|
||||
const q1 = rewards.quote(m1); ok('the quote is the draw inside the range', q1 >= 0.05 && q1 <= 1);
|
||||
const q1 = rewards.quote(m1, true); ok('the quote is the draw inside the range', q1 >= 0.05 && q1 <= 1);
|
||||
const q0 = rewards.quote(m1, false); ok('the free tier draws on the small range (2026-11-02)', q0 >= 0.02 && q0 <= 0.1);
|
||||
let g = rewards.grant(me, m1, { pol: 0.03, nominal: q1, gp: { ref: 'find:m1:' + day, kind: 'daily' } });
|
||||
ok('a find pays what IAP allowed, due for the faucet', g.ok && g.rec.pol === 0.03 && g.rec.status === 'due' && g.rec.nominal === q1 && g.rec.gp.ref === 'find:m1:' + day);
|
||||
g = rewards.grant(me, m2, { pol: 0, nominal: 0.2, gp: { ref: 'find:m2:' + day, kind: 'daily', capHit: 'daily' } });
|
||||
ok('a find at the cap: recorded as capped, pays nothing, never reaches the faucet', g.capped && g.rec.status === 'capped' && g.rec.pol === 0 && !rewards.payable().some(p => p.id === g.rec.id));
|
||||
ok('a capped find still counts as today\'s find and completes the mission', rewards.findsToday(7) === 2 && rewards.completed(7, 'm2', me.wallet) && rewards.daily(7, new Set(), 0, 0).left === 1);
|
||||
ok('a capped find still counts as today\'s find and completes the mission', rewards.findsToday(7) === 2 && rewards.completed(7, 'm2', me.wallet) && rewards.daily(7, new Set(), 0, 0, true).left === 1);
|
||||
const gw = rewards.grant(me, { id: 'm3', site: 'three.com' }, { pol: 0.4, status: 'gp-wait', nominal: 0.4, gp: { ref: 'find:m3:' + day, kind: 'daily', pending: true } });
|
||||
ok('IAP unreachable: the find is recorded as gp-wait, not payable yet', gw.waiting && gw.rec.status === 'gp-wait' && !rewards.payable().some(p => p.id === gw.rec.id));
|
||||
rewards.settleQueued(gw.rec.id, 0.25, { pass: false }); const settled = store.read('payouts', []).find(p => p.id === gw.rec.id);
|
||||
ok('the queue answer settles it: pays the allowed part, due', settled.pol === 0.25 && settled.status === 'due' && settled.gp.pending === false);
|
||||
rewards.settleQueued(gw.rec.id, 0.9, {}); ok('a settled row is not settled twice', store.read('payouts', []).find(p => p.id === gw.rec.id).pol === 0.25);
|
||||
const gpaid = rewards.grant(me, mpaid); ok('an advertiser-funded mission pays the advertiser\'s amount, ungated (no gp on the row)', gpaid.rec.pol === 0.2 && !gpaid.rec.gp && gpaid.rec.paid === true);
|
||||
ok('the perk: +2 missions a day with the pass', rewards.daily(7, new Set(), 0, 2).limit === 5 && rewards.daily(7, new Set(), 0, 0).limit === 3);
|
||||
ok('the perk: +2 missions a day with the pass', rewards.daily(7, new Set(), 0, 2, true).limit === 5 && rewards.daily(7, new Set(), 0, 0, true).limit === 3);
|
||||
ok('the free tier: one hunt a day without the pass (2026-11-02)', rewards.daily(7, new Set(), 0, 0, false).limit === 1 && rewards.daily(7, new Set(), 0, 0).limit === 1);
|
||||
|
||||
// ---- Ad Detective: the case is scored first, then IAP decides; a second case a day with the pass
|
||||
rewards.setSettings({ detectiveOn: 1, detectivePol: 0.15 });
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
// The Network Tour (Marty 2026-11-17): mission rotation per hunter and the free tier's tour stops, end to end on a local
|
||||
// boot with GAMEPASS=on against a stub InstantAdPay (player, polgrant, credits). Production is never contacted.
|
||||
// Covers: round progression and reset, a mission added mid-round, a paused mission, never-visited first then least
|
||||
// recently found, the start gate, the Full Network Tour badge once per round, discovery pays POL for a free member,
|
||||
// a repeat after the full tour is a tour stop (credits, no POL), a new mission pays POL once, Game Pass holders
|
||||
// unchanged, tour-stop credits capped per day and idempotent on ref, daily limits unchanged.
|
||||
// Run: node test/rotation.js
|
||||
'use strict';
|
||||
const { spawn } = require('child_process');
|
||||
const http = require('http'), crypto = require('crypto'), path = require('path'), fs = require('fs');
|
||||
|
||||
const PORT = 8897, DIR = path.join(__dirname, '..', 'data-test-rot'), SECRET = 'r'.repeat(48);
|
||||
fs.rmSync(DIR, { recursive: true, force: true });
|
||||
let fails = 0;
|
||||
const eq = (a, b, m) => { const ok = JSON.stringify(a) === JSON.stringify(b); console.log((ok ? ' ok ' : ' FAIL ') + m + (ok ? '' : ' -> got ' + JSON.stringify(a) + ' want ' + JSON.stringify(b))); if (!ok) fails++; };
|
||||
const sleep = ms => new Promise(r => setTimeout(r, ms));
|
||||
const B = 'http://127.0.0.1:' + PORT, ORG = { Origin: 'http://127.0.0.1:' + PORT };
|
||||
const DAY = 86400000, ctDay = t => new Date(t).toLocaleDateString('en-CA', { timeZone: 'America/Chicago' });
|
||||
|
||||
// ---- the stub InstantAdPay: pass flags per member, polgrant answers allowed = pol, credits once per ref
|
||||
const PASS = { 102: true }; const creditCalls = []; const granted = new Map();
|
||||
const stub = http.createServer((req, res) => { let raw = ''; req.on('data', c => raw += c); req.on('end', () => {
|
||||
const u = new URL(req.url, 'http://x'); const send = (c, o) => { res.writeHead(c, { 'Content-Type': 'application/json' }); res.end(JSON.stringify(o)); };
|
||||
if (req.method === 'GET') { const m = Number(u.searchParams.get('m')); return send(200, { ok: true, memberId: m, pass: { active: !!PASS[m], until: PASS[m] ? Date.now() + 7 * DAY : null } }); }
|
||||
const sig = crypto.createHmac('sha256', SECRET).update(req.headers['x-game-ts'] + '\n' + raw).digest('hex');
|
||||
if (sig !== req.headers['x-game-sig']) return send(401, { error: 'bad signature' });
|
||||
const b = JSON.parse(raw);
|
||||
if (u.pathname === '/api/partner/credits') { creditCalls.push(b); if (granted.has(b.ref)) return send(200, { ok: true, repeat: true, credits: granted.get(b.ref) }); granted.set(b.ref, b.credits); return send(200, { ok: true, credits: b.credits }); }
|
||||
if (u.pathname === '/api/partner/polgrant') return send(200, { allowed: b.pol, deferred: 0, carried: 0, pass: !!PASS[b.memberId], day: ctDay(Date.now()) });
|
||||
send(404, { error: 'no' });
|
||||
}); });
|
||||
|
||||
let child; const jars = {};
|
||||
const call = async (who, p, opt = {}) => {
|
||||
const res = await fetch(B + p, Object.assign({ redirect: 'manual' }, opt, { headers: Object.assign({ Cookie: jars[who] || '', 'Content-Type': 'application/json' }, opt.headers || {}) }));
|
||||
const sc = res.headers.get('set-cookie'); if (sc && /ph\.sid=/.test(sc)) jars[who] = sc.split(';')[0];
|
||||
let body = null; try { body = await res.json(); } catch (e) {} return { status: res.status, body };
|
||||
};
|
||||
const admin = (p, body) => call('admin', p, { method: body ? 'POST' : 'GET', body: body ? JSON.stringify(body) : undefined, headers: { 'X-Admin-Key': 'adminkey123' } });
|
||||
const mission = (id, extra) => admin('/api/admin/mission', Object.assign({ id, site: 'Site ' + id.toUpperCase(), name: 'Find ' + id, brief: 'x', url: B + '/index.html', dwell: 5, slots: 1 }, extra || {}));
|
||||
const PF = path.join(DIR, 'payouts.json');
|
||||
const readP = () => { try { return JSON.parse(fs.readFileSync(PF, 'utf8')); } catch (e) { return []; } };
|
||||
const writeP = all => fs.writeFileSync(PF, JSON.stringify(all));
|
||||
// a past find, written straight onto the ledger (history the hunter already has)
|
||||
const past = (memberId, missionId, daysAgo, wallet) => { const all = readP(); const at = Date.now() - daysAgo * DAY; all.push({ id: 'h' + memberId + missionId + daysAgo, memberId, wallet, missionId, site: 'Site ' + missionId.toUpperCase(), pol: 0.05, day: ctDay(at), at, status: 'paid' }); writeP(all); };
|
||||
// move a member's finds of a mission to yesterday (so the once-a-day rule does not hide what the rotation does)
|
||||
const toYesterday = (memberId, missionId) => { const all = readP(); for (const p of all) if (p.memberId === memberId && p.missionId === missionId) p.day = ctDay(Date.now() - DAY); writeP(all); };
|
||||
// a real find: start, wait the dwell, read the code from the embed, submit
|
||||
async function find(who, missionId) {
|
||||
const st = await call(who, '/api/my/start', { method: 'POST', body: JSON.stringify({ missionId }) }); if (st.status !== 200) return st;
|
||||
await sleep(5300); const code = await (await fetch(B + '/api/embed/code?t=' + st.body.token, { headers: ORG })).json();
|
||||
return call(who, '/api/my/submit', { method: 'POST', body: JSON.stringify({ token: st.body.token, code: code.code }) });
|
||||
}
|
||||
const signIn = (who, memberId, pass) => call(who, '/auth?t=' + sso.mint({ memberId, email: 'h' + memberId + '@example.com', wallet: '0x' + String(memberId).padStart(40, '0'), username: 'hunter' + memberId, gamePass: { active: !!pass, until: pass ? Date.now() + 7 * DAY : null } }));
|
||||
let sso;
|
||||
|
||||
(async () => {
|
||||
await new Promise(r => stub.listen(0, '127.0.0.1', r));
|
||||
const env = Object.assign({}, process.env, { PORT: String(PORT), DATA_DIR: DIR, HUNT_SSO_SECRET: SECRET, ADMIN_KEY: 'adminkey123', SIGNUPS: 'open', SITE_URL: B, GAMEPASS: 'on', IAP_URL: 'http://127.0.0.1:' + stub.address().port });
|
||||
delete env.CURTAIN; delete env.OUTBOUND; delete env.HUNT_WALLET_KEY; delete env.HUNT_RPC;
|
||||
child = spawn(process.execPath, [path.join(__dirname, '..', 'server.js')], { env, stdio: ['ignore', 'pipe', 'pipe'] });
|
||||
child.stderr.on('data', d => process.stderr.write(d));
|
||||
for (let i = 0; i < 120; i++) { try { await fetch(B + '/health'); break; } catch (e) { await sleep(500); } }
|
||||
process.env.HUNT_SSO_SECRET = SECRET; sso = require('../lib/sso');
|
||||
|
||||
for (const id of ['a', 'b', 'c']) await mission(id);
|
||||
await signIn('free', 101, false); await signIn('pass', 102, true);
|
||||
|
||||
// ---- limits unchanged: the free tier is 1 a day, the Game Pass 3 + 2 = 5, rotation on by default
|
||||
let bf = await call('free', '/api/my/board'), bp = await call('pass', '/api/my/board');
|
||||
eq([bf.body.daily.limit, bp.body.daily.limit, bf.body.tour.on, bf.body.tour.total, bf.body.tour.done, bf.body.tour.round], [1, 5, true, 3, 0, 1], 'limits unchanged (free 1, Pass 5); rotation on; tour 0 of 3, round 1');
|
||||
eq(bf.body.tour.left.slice().sort(), ['Site A', 'Site B', 'Site C'], 'the board lists the sites left this round by name');
|
||||
await admin('/api/admin/settings', { freeMissionsPerDay: 10 }); // room for several finds in one test day (restored below)
|
||||
|
||||
// ---- discovery pays POL for a free member
|
||||
let r = await find('free', 'a');
|
||||
eq([r.status, r.body.pol >= 0.02 && r.body.pol <= 0.1, !!r.body.tourStop], [200, true, false], 'free member, first find of a mission: POL on the free draw, not a tour stop');
|
||||
bf = await call('free', '/api/my/board');
|
||||
eq([bf.body.tour.done, bf.body.tour.left.includes('Site A'), bf.body.missions.find(m => m.id === 'a').done], [1, false, true], 'round progress: 1 of 3, Site A off the list, shown as done today');
|
||||
|
||||
// ---- the start gate: found earlier in this round = refused, even on a new day
|
||||
toYesterday(101, 'a');
|
||||
r = await call('free', '/api/my/start', { method: 'POST', body: JSON.stringify({ missionId: 'a' }) });
|
||||
eq([r.status, r.body.tour], [400, true], 'a mission found earlier this round cannot be started again (rotation)');
|
||||
bf = await call('free', '/api/my/board'); eq(bf.body.missions.map(m => m.id).includes('a'), false, 'and the board does not offer it');
|
||||
|
||||
// ---- a paused mission is skipped and never blocks the round; finishing the rest closes it
|
||||
const ms = (await admin('/api/admin/state')).body.missions; const mc = ms.find(m => m.id === 'c');
|
||||
await mission('c', { active: false, dwell: mc.dwell, slots: mc.slots });
|
||||
bf = await call('free', '/api/my/board'); eq([bf.body.tour.total, bf.body.tour.left], [2, ['Site B']], 'paused mission c is out of the round: 1 of 2, only Site B left');
|
||||
r = await find('free', 'b');
|
||||
eq([r.status, r.body.round, r.body.unlocked.includes('sweep')], [200, 1, true], 'finishing the round: round 1 closed, Full Network Tour celebrated');
|
||||
bf = await call('free', '/api/my/board');
|
||||
eq([bf.body.tour.round, bf.body.tour.rounds, bf.body.tour.done, bf.body.badges.some(b => b.id === 'sweep' && b.name === 'Full Network Tour')], [2, 1, 0, true], 'reset: round 2 starts at 0, the badge reads Full Network Tour');
|
||||
|
||||
// ---- a mission added (or back) mid-round joins as not done, never-visited first
|
||||
await mission('c', { active: true });
|
||||
bf = await call('free', '/api/my/board');
|
||||
eq([bf.body.tour.total, bf.body.missions[0].id, bf.body.missions[0].fresh], [3, 'c', true], 'mission c back mid-round: part of round 2, offered first as never visited');
|
||||
eq(bf.body.tour.toured, false, 'not toured yet: c was never found');
|
||||
r = await find('free', 'c');
|
||||
eq([r.status, r.body.pol > 0, !!r.body.tourStop], [200, true, false], 'a mission new to this free member pays POL on the first find');
|
||||
bf = await call('free', '/api/my/board');
|
||||
eq([bf.body.tour.toured, bf.body.tour.free, bf.body.missions.filter(m => !m.done).every(m => m.tourStop && m.tourStop.credits === 10)], [true, true, true], 'every active mission found once: toured; the open cards read as tour stops worth 10 credits');
|
||||
|
||||
// ---- after the full tour a free member's repeat is a tour stop: credits, not POL; capped at the daily max
|
||||
toYesterday(101, 'b');
|
||||
const before = creditCalls.length;
|
||||
r = await find('free', 'a');
|
||||
eq([r.status, r.body.pol, r.body.tourStop && r.body.tourStop.credits, /Tour stop/.test(r.body.message)], [200, 0, 10, true], 'repeat after the full tour: a tour stop, 0 POL, +10 ad credits');
|
||||
await sleep(400);
|
||||
const stopRow = readP().find(p => p.memberId === 101 && p.tourStop);
|
||||
eq([creditCalls.length - before, creditCalls.at(-1) && creditCalls.at(-1).credits, creditCalls.at(-1) && creditCalls.at(-1).ref, stopRow.status, stopRow.pol, stopRow.tourStop.state], [1, 10, 'tour:' + stopRow.id, 'tour', 0, 'sent'], 'one signed credits call, ref tour:<row id>, row is a 0 POL tour stop marked sent');
|
||||
eq(readP().filter(p => p.memberId === 101 && p.missionId === 'a').map(p => p.status), ['due', 'tour'], 'mission a: the discovery drip (due) and the tour stop, no second POL drip');
|
||||
r = await find('free', 'b');
|
||||
eq([r.status, r.body.pol, r.body.tourStop.credits, r.body.round], [200, 0, 0, 2], 'second tour stop the same day: credits capped at the daily max (0 more), and it closes round 2');
|
||||
await sleep(300); eq(creditCalls.length - before, 1, 'no credits call for a capped stop');
|
||||
// idempotent on ref: a stop sent again (a retry) is answered as a repeat and never granted twice
|
||||
{ process.env.GAMEPASS = 'on'; const store = require('../lib/store'); store.init(DIR); const gp = require('../lib/polgrant'); const rot = require('../lib/rotation');
|
||||
gp.use({ game: 'polhunter', secret: SECRET, iap: 'http://127.0.0.1:' + stub.address().port, store });
|
||||
rot.markStop(stopRow.id, { state: 'due' }); const again = await rot.deliver(readP().find(p => p.id === stopRow.id), gp);
|
||||
eq([again.tourStop.state, granted.get('tour:' + stopRow.id), [...granted.values()].reduce((a, b) => a + b, 0)], ['sent', 10, 10], 'a retried stop reuses its ref: 10 credits granted once in total');
|
||||
const capped = rot.tourStop({ memberId: 101, email: 'h101@example.com', wallet: '0x' + '101'.padStart(40, '0') }, { id: 'zz', site: 'Z' });
|
||||
eq([capped.tourStop.credits, capped.tourStop.state], [0, 'none'], 'the daily max holds at the library too (10 already granted today)'); }
|
||||
|
||||
// ---- a newly added mission pays POL again to a toured free member, once
|
||||
await mission('d');
|
||||
bf = await call('free', '/api/my/board'); eq([bf.body.tour.toured, bf.body.missions[0].id], [false, 'd'], 'new mission d: no longer toured, d offered first');
|
||||
r = await find('free', 'd'); eq([r.status, r.body.pol > 0, !!r.body.tourStop], [200, true, false], 'the new mission pays POL on the first find');
|
||||
|
||||
// ---- never visited first, then least recently found (member 103, history only)
|
||||
past(103, 'a', 4, '0x' + '103'.padStart(40, '0')); past(103, 'b', 3, '0x' + '103'.padStart(40, '0')); past(103, 'c', 2, '0x' + '103'.padStart(40, '0')); past(103, 'd', 5, '0x' + '103'.padStart(40, '0'));
|
||||
await signIn('h103', 103, true); await call('h103', '/api/my/board'); await mission('e');
|
||||
const b3 = await call('h103', '/api/my/board');
|
||||
eq([b3.body.tour.rounds, b3.body.missions.map(m => m.id)], [1, ['e', 'd', 'a', 'b', 'c']], 'a whole history closes round 1; round 2 order: never visited (e), then least recently found (d, a, b, c)');
|
||||
|
||||
// ---- Game Pass holders unchanged: a repeat pays POL on the full draw
|
||||
past(102, 'a', 3, '0x' + '102'.padStart(40, '0')); past(102, 'b', 3, '0x' + '102'.padStart(40, '0')); past(102, 'c', 3, '0x' + '102'.padStart(40, '0')); past(102, 'd', 3, '0x' + '102'.padStart(40, '0')); past(102, 'e', 3, '0x' + '102'.padStart(40, '0'));
|
||||
r = await find('pass', 'a');
|
||||
eq([r.status, r.body.pol >= 0.05 && r.body.pol <= 1, !!r.body.tourStop], [200, true, false], 'Game Pass holder repeat: POL on the full draw, never a tour stop');
|
||||
|
||||
// ---- rotation off: everything is offered again (the old board), the badge stays
|
||||
toYesterday(101, 'd'); const on1 = await call('free', '/api/my/board');
|
||||
await admin('/api/admin/settings', { rotationOn: 0 });
|
||||
bf = await call('free', '/api/my/board'); eq([on1.body.missions.some(m => m.id === 'd'), bf.body.tour.on, bf.body.missions.some(m => m.id === 'd' && !m.done)], [false, true && false, true], 'rotationOn 0: no progress panel, a mission found this round is offered again');
|
||||
await admin('/api/admin/settings', { rotationOn: 1, freeMissionsPerDay: 1 });
|
||||
bf = await call('free', '/api/my/board'); eq(bf.body.daily.limit, 1, 'free tier back to 1 a day');
|
||||
|
||||
// ---- admin: round stats per hunter
|
||||
const av = await admin('/api/admin/rotation'); const h101 = av.body.hunters.find(h => h.memberId === 101);
|
||||
eq([av.status, h101.rounds, av.body.settings.credits, av.body.settings.dailyMax, av.body.tourStops.creditsSent], [200, 2, 10, 10, 10], 'admin: rounds per hunter, settings 10 / 10, 10 credits sent');
|
||||
|
||||
console.log(fails ? '\nFAILURES: ' + fails : '\nALL ROTATION CHECKS PASS');
|
||||
child.kill(); stub.close(); fs.rmSync(DIR, { recursive: true, force: true }); process.exit(fails ? 1 : 0);
|
||||
})().catch(e => { console.error('CRASH', e); if (child) child.kill(); process.exit(1); });
|
||||
+2
-1
@@ -24,7 +24,8 @@ const admin = (p, opt = {}) => call(p, Object.assign(opt, { headers: { 'X-Admin-
|
||||
const sleep = ms => new Promise(r => setTimeout(r, ms));
|
||||
|
||||
(async () => {
|
||||
await sleep(1200);
|
||||
// wait for the server to listen (a busy machine can take well over a second to load ethers)
|
||||
for (let i = 0; i < 120; i++) { try { await fetch(B + '/health'); break; } catch (e) { await sleep(500); } }
|
||||
process.env.HUNT_SSO_SECRET = env.HUNT_SSO_SECRET; const sso = require('../lib/sso');
|
||||
const h = await call('/health'); eq([h.body.outbound, h.body.signups, h.body.faucet, h.body.sso], [false, true, false, true], 'posture: outbound off, signups open, faucet off, sso on');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user