Earn-and-spend credit economy + private rehearsal chain cutover

Members earn credits by attention (spec 8b): daily 5-ad set with dwell
timing and a too-fast guard, then a claimable daily batch. Earned credits
now FUND campaigns: banner/text budgets draw earned-first (free members can
advertise on welcome credits alone), purchased credits and the on-chain
burn queue only cover the remainder; earned-only campaigns pause when the
pool runs dry. New Earn credits section in the member menu with the viewer.
Explorer links degrade gracefully for the private chain (contract page
points at the audited Amoy verification). Site flipped to the anvil
rehearsal chain at rpc.instantadpay.com: unlimited test POL, no more
faucets. E2E: welcome->views->claim->earned-funded campaign->charged
serving, all green. Assets v=20260905d.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-05 05:59:42 -05:00
parent d5bb74db7a
commit cdeb59ed7f
11 changed files with 274 additions and 41 deletions
+27 -5
View File
@@ -4,7 +4,7 @@
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>Member area | InstantAdPay</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&display=swap">
<link rel="stylesheet" href="/assets/site.css?v=20260905b">
<link rel="stylesheet" href="/assets/site.css?v=20260905d">
</head>
<body class="bo-body">
@@ -55,6 +55,7 @@
<button data-pane="overview" class="on" type="button"><svg viewBox="0 0 24 24"><rect x="3" y="3" width="8" height="8" rx="2"/><rect x="13" y="3" width="8" height="8" rx="2"/><rect x="3" y="13" width="8" height="8" rx="2"/><rect x="13" y="13" width="8" height="8" rx="2"/></svg>Overview</button>
<button data-pane="line" type="button"><svg viewBox="0 0 24 24"><circle cx="12" cy="7" r="3.2"/><circle cx="5" cy="17" r="2.6"/><circle cx="19" cy="17" r="2.6"/><path d="M12 10v3M12 13l-5 2M12 13l5 2"/></svg>My line</button>
<button data-pane="campaigns" type="button"><svg viewBox="0 0 24 24"><path d="M3 11l14-5v12L3 13v-2z"/><path d="M17 8a4 4 0 0 1 0 8M7 13v5a2 2 0 0 0 4 0v-3"/></svg>Campaigns</button>
<button data-pane="earn" type="button"><svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="8.5"/><path d="M12 7.5v9M9 10c0-1.1 1.3-1.8 3-1.8s3 .7 3 1.8-1.3 1.6-3 1.8-3 .7-3 1.8 1.3 1.8 3 1.8 3-.7 3-1.8"/></svg>Earn credits</button>
<button data-pane="earnings" type="button"><svg viewBox="0 0 24 24"><path d="M4 17l5-5 4 3 7-8"/><path d="M14 7h6v6"/></svg>Earnings</button>
<button data-pane="wallet" type="button"><svg viewBox="0 0 24 24"><rect x="3" y="6" width="18" height="13" rx="2"/><path d="M3 10h18"/><circle cx="16.5" cy="14.5" r="1.4"/></svg>Wallet</button>
</nav>
@@ -155,6 +156,27 @@
</div>
</div>
<div class="pane" id="pane-earn" hidden>
<div class="card">
<h3>Earn credits by viewing ads</h3>
<p class="muted small">View today's set of member ads, each for a few seconds, and claim your
daily credits. Attention earns advertising here: your earned credits spend on banner and text
campaigns, just like purchased ones.</p>
<p><span class="badge" id="earnProgress">…</span>
<span class="badge" id="earnBalance">…</span></p>
<div class="card" style="background:rgba(4,8,7,.5)" id="earnStage">
<div id="earnAdBox" class="small muted" style="min-height:120px;display:grid;place-items:center">
Press start to see the first ad.</div>
<p style="margin-top:14px">
<button class="btn" id="earnStartBtn" type="button">Start viewing</button>
<button class="btn" id="earnNextBtn" type="button" hidden disabled>Next ad</button>
<button class="btn" id="earnClaimBtn" type="button" hidden>Claim today's credits</button>
</p>
<p class="small muted" id="earnHint"></p>
</div>
</div>
</div>
<div class="pane" id="pane-earnings" hidden>
<div id="activityArea" hidden>
<div class="grid c2">
@@ -208,9 +230,9 @@
</div>
</div>
<script src="/assets/common.js?v=20260905b"></script>
<script src="/assets/wallet.js?v=20260905b"></script>
<script src="/assets/my.js?v=20260905b"></script>
<script src="/assets/chat.js?v=20260905b"></script>
<script src="/assets/common.js?v=20260905d"></script>
<script src="/assets/wallet.js?v=20260905d"></script>
<script src="/assets/my.js?v=20260905d"></script>
<script src="/assets/chat.js?v=20260905d"></script>
</body>
</html>