cdeb59ed7f
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>
22 lines
953 B
JavaScript
22 lines
953 B
JavaScript
// Contract page: inject live address, chain, explorer + verified-source links.
|
|
(async function () {
|
|
await IAP.renderNav('contract');
|
|
const c = await IAP.getConfig();
|
|
const $ = IAP.$;
|
|
$('cAddr').textContent = c.contract.slice(0, 10) + '…' + c.contract.slice(-6);
|
|
$('cChain').textContent = c.chainName;
|
|
$('mockAddr').textContent = c.contract.slice(0, 18) + '…';
|
|
if (c.explorer) {
|
|
$('lnkExplorer').href = c.explorer + '/address/' + c.contract + '#code';
|
|
const src = 'https://repo.sourcify.dev/contracts/full_match/' + c.chainId + '/' + c.contract + '/';
|
|
$('lnkSource').href = src;
|
|
$('lnkSource2').href = src;
|
|
} else {
|
|
// private rehearsal chain: point at the audited Amoy verification instead
|
|
const src = 'https://repo.sourcify.dev/contracts/full_match/80002/0xaF47EC401A9B0D570a553b1A1c95D6079083636e/';
|
|
$('lnkExplorer').href = src;
|
|
$('lnkSource').href = src;
|
|
$('lnkSource2').href = src;
|
|
}
|
|
})();
|