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:
@@ -101,8 +101,8 @@ let cCache = null;
|
||||
async function contract() {
|
||||
if (cCache && Date.now() - cCache.at < 300000) return cCache.v;
|
||||
const v = { address: C.contractAddress || null, chainId: C.chainId, explorer: C.explorer, split: { sponsorPct: 30, prizePct: 10, companyPct: 60 },
|
||||
// Marty 2026-11-14: source verified on Sourcify (exact match, 2026-11-13); Polygonscan's own verification is pending
|
||||
verified: { sourcify: true, polygonscan: 'pending', sourcifyUrl: C.contractAddress ? 'https://repo.sourcify.dev/' + C.chainId + '/' + C.contractAddress : null },
|
||||
// Sourcify exact match 2026-11-13; Polygonscan verified 2026-11-16 (env VERIFIED_POLYGONSCAN=1 shows it as done)
|
||||
verified: { sourcify: true, polygonscan: process.env.VERIFIED_POLYGONSCAN === '1' ? 'done' : 'pending', sourcifyUrl: C.contractAddress ? 'https://repo.sourcify.dev/' + C.chainId + '/' + C.contractAddress : null },
|
||||
ownerNote: "Marty's Tangem hardware wallet", live: false };
|
||||
if (shop && shop.watching()) {
|
||||
const I = new Interface(['function owner() view returns (address)', 'function company() view returns (address)', 'function keeper() view returns (address)',
|
||||
|
||||
@@ -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>';
|
||||
})();
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user