e545343fe0c4057bb71b52ed9f5cb1a9c8273800
1. Top-up across positions: an ad burns from ONE position, and topUpCampaign only looked at the ad's
own position (or the main one when the list row had no memberId), so credits bought on a linked
position could never top up the ad. Ported from InstantAdPay 2026-09-27 (Jim Watts): the ad's real
member id is read from the campaign row; when it cannot cover, the refusal names where the free
credits are and offers switchOptions; with the member's yes (switchTo, only a position on the
account) moveFunding settles what the ad already ran up on the OLD position, moves the ad, then
tops up. Ads screen asks in-page (own dialog) and retries. Create already had the largest-position guard.
2. Toasts: errors stay until closed (close button, role=alert), other notes 3.5 to 9 s by length.
3. Banner Spin per-banner clicks: his 3 clicks were all unmatched (no view on record for that browser),
so they landed on the fallback row and every banner said 0. Click matching now also tries the same
connection (daily-salted IP-only hash) when the browser key finds nothing (mail/exchange app view,
click opened in the phone browser), view notes last 60 min instead of 15, and the stats split
'Fallback shown' from 'Clicks not tied to a banner' so the rows add up to the total. History is not
backfilled: views were never stored per visitor, so old clicks cannot be tied reliably.
4. Holding tank: hub-made waiting accounts with no sponsor are in the tank (waiting, rescue, readyTick
read listAll with { shells: true }; 'hub-shell' no longer holds anyone back). Locked / sponsored /
unknown, grace, 2-adoption cap unchanged; readyTick still never switches a shell on;
accounts.listAll default unchanged (mailings skip shells).
Assets: cr.css, cr-shell.js, ads-screen.js ?v=20261114tu, banner-spin.js ?v=20261114bc.
QA: walk member 0 bugs (36 ok), netconv 57/57, networksso ALL PASSED, tank-hold all passed (new hub
shell part), profile policy 16/16, new topup-positions 8/8, new bannerspin-attrib 7/7, bannerspin e2e
75/75, hubsync 15 checks, tank-cap 15/15, sponsorfollow 30/30.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Network sign-in for Viral Banner Blitz (2026-11-14): vbb listed under networksso wallets (VBB_URL, default https://viralbannerblitz.com), so "Sign in with LinkSpin" works on VBB the way it does on Downline Banners; NAMES gains vbb (same networksso.js as IAP, DLB, VBB). networksso unit + e2e: ALL PASSED
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%