fd6f88cab7c9dc3b7f84921833da1ff9866800c9
The InstantAdPay 2026-09-17 fix was never ported. nas.deactivate zeroed `remaining` with no snapshot, so served = assigned - remaining read the undelivered rest as delivered, and reconcileNas read EVERY status: a paused ad was charged for its zeroed remainder (up to its budget) and stopped ads showed their whole allocation as network views. Now: nas.deactivate returns the served count read before the stop; ads.stopNas persists it on pause, end and exhaustion; reconcileNas only looks at active campaigns; resume/top-up of a stopped ad uses the new nas.restart (re-bases assigned on the true count) instead of a plain top-up. QA: qa/nas-stop.test.cjs (9), loginqueue 13, refill 12, run.sh member passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LinkSpin — site
Membership advertising with immutable on-chain settlement. Zero-dependency Node server (RM Circle pattern): static pages + JSON API + SSE ledger.
Architecture
server.js— http server: pages,/api/*,/join/<id>sponsor links, SSE feedchain.js— contract reader + persistent event indexer (free public RPCs)auth.js— SIWE wallet sign-in (EIP-4361), sessions in the volumeaccounts.js— site-side records only (free members, last-touch sponsor attribution, handles). The CHAIN is the source of truth for money/credits.public/— landing, live ledger, member area; no client libraries
Chain flip (rehearsal → mainnet)
Everything chain-specific lives in data/config.json (volume):
{contract, chainId, chainName, explorer, rpcs, deployBlock}.
Defaults point at the Amoy rehearsal deployment. Launch = deploy the
mainnet contract, wipe accounts.json/sessions.json/chain-index.json,
PATCH /api/admin/chain with the mainnet values, set rehearsal:false via
/api/admin/site. Same code, different config.
Run
PORT=3100 node server.js # DATA_DIR defaults to ./data
Admin API auth: Authorization: Bearer $ADMIN_PASSWORD.
Spec: ../CONTRACT-SPEC.md (v1.0.3-frozen). Contracts: ../contracts/.
Description
Languages
JavaScript
81.3%
HTML
13.9%
CSS
3.8%
Python
0.7%
Shell
0.3%