Contract page: Polygonscan verification env-driven (VERIFIED_POLYGONSCAN=1); VBBShop verified on Polygonscan 2026-11-16

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-16 07:20:52 -06:00
parent e5595bdf4a
commit 7c68faded5
3 changed files with 7 additions and 5 deletions
+3 -1
View File
@@ -9,7 +9,7 @@
if (!d.address) { el.innerHTML = '<tr><td class="muted">The contract address is not set on this copy of the site.</td></tr>'; return; }
const rows = [
['Contract', addr(d.address, 'VBBShop on ' + (d.chainId === 137 ? 'Polygon' : 'chain ' + d.chainId))],
['Source code', 'Verified on <a href="' + esc(d.verified && d.verified.sourcifyUrl || '#') + '" target="_blank" rel="noopener">Sourcify</a> (exact match). Polygonscan verification: ' + esc(d.verified && d.verified.polygonscan === 'pending' ? 'pending' : 'done')],
['Source code', 'Verified on <a href="' + esc(d.verified && d.verified.sourcifyUrl || '#') + '" target="_blank" rel="noopener">Sourcify</a> (exact match). Polygonscan: ' + (d.verified && d.verified.polygonscan === 'done' ? '<a href="' + esc(ex) + '/address/' + esc(d.address) + '#code" target="_blank" rel="noopener">verified</a>' : 'pending')],
['Owner', addr(d.owner, 'A Tangem hardware wallet. It can pause new sales, set package prices, and change the keeper and the prize wallet. It cannot move anyone\'s money or change the split.')],
['Prize wallet', addr(d.prizeWallet, 'Receives the 10% prize share of each purchase and pays the weekly leaderboard winners.')],
['Company', addr(d.company, 'Viral Banner Blitz. Fixed in the contract when it was deployed.')],
@@ -17,5 +17,7 @@
['Sales', d.live ? (d.paused ? '<b>Paused</b>' : 'Open') + ' · ' + VBB.n(d.orderCount) + ' purchases so far' : '<span class="muted">' + esc(d.error || 'not read yet') + '</span>'],
['Held by the contract', d.live ? pol(d.balanceWei) + (BigInt(d.totalOwedWei || 0) > 0n ? ' (all of it owed to wallets whose payment bounced, waiting for them to claim)' : ' (nothing is kept: every purchase is paid out in the same transaction)') : '<span class="muted">not read yet</span>']
];
const psn = document.getElementById('psnote');
if (psn) psn.textContent = d.verified && d.verified.polygonscan === 'done' ? 'Its source code is verified on Polygonscan (Contract tab) and on Sourcify (exact match).' : 'Its source code is verified on Sourcify (exact match); the Polygonscan verification check is pending, so use the Sourcify link to read the source.';
el.innerHTML = '<tbody>' + rows.map(r => '<tr><th style="width:30%">' + r[0] + '</th><td>' + r[1] + '</td></tr>').join('') + '</tbody>';
})();
+2 -2
View File
@@ -43,7 +43,7 @@
<div class="card">
<h2>Check it yourself</h2>
<ol class="small">
<li>Open the contract on Polygonscan (link above). Its source code is verified on Sourcify (exact match); Polygonscan's own verification check is pending, so use the Sourcify link to read the source.</li>
<li>Open the contract on Polygonscan (link above). <span id="psnote">Its source code is verified on Sourcify (exact match).</span></li>
<li>On Polygonscan, choose <b>Read Contract</b> and compare owner, prize wallet, company and keeper with this page.</li>
<li>Open any purchase in the <a href="/ledger">live ledger</a> and look at its <b>Logs</b>: one Purchase event, then one Paid event per payment.</li>
</ol>
@@ -51,7 +51,7 @@
<div id="status" class="note" hidden></div>
</main>
<script src="/assets/common.js?v=9"></script>
<script src="/assets/contract.js?v=1"></script>
<script src="/assets/contract.js?v=2"></script>
<script src="/assets/chat.js?v=2" defer></script>
</body>
</html>