From 7c68faded51d60b74580ce10ea195cfbd3dfef8a Mon Sep 17 00:00:00 2001 From: martbost Date: Mon, 16 Nov 2026 07:20:52 -0600 Subject: [PATCH] Contract page: Polygonscan verification env-driven (VERIFIED_POLYGONSCAN=1); VBBShop verified on Polygonscan 2026-11-16 Co-Authored-By: Claude Opus 5.5 --- proof.js | 4 ++-- public/assets/contract.js | 4 +++- public/contract.html | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/proof.js b/proof.js index f3ce3f4..5840b07 100644 --- a/proof.js +++ b/proof.js @@ -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)', diff --git a/public/assets/contract.js b/public/assets/contract.js index 097adfb..ddce366 100644 --- a/public/assets/contract.js +++ b/public/assets/contract.js @@ -9,7 +9,7 @@ if (!d.address) { el.innerHTML = 'The contract address is not set on this copy of the site.'; return; } const rows = [ ['Contract', addr(d.address, 'VBBShop on ' + (d.chainId === 137 ? 'Polygon' : 'chain ' + d.chainId))], - ['Source code', 'Verified on Sourcify (exact match). Polygonscan verification: ' + esc(d.verified && d.verified.polygonscan === 'pending' ? 'pending' : 'done')], + ['Source code', 'Verified on Sourcify (exact match). Polygonscan: ' + (d.verified && d.verified.polygonscan === 'done' ? 'verified' : '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 ? 'Paused' : 'Open') + ' ยท ' + VBB.n(d.orderCount) + ' purchases so far' : '' + esc(d.error || 'not read yet') + ''], ['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)') : 'not read yet'] ]; + 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 = '' + rows.map(r => '' + r[0] + '' + r[1] + '').join('') + ''; })(); diff --git a/public/contract.html b/public/contract.html index 3725635..01d7119 100644 --- a/public/contract.html +++ b/public/contract.html @@ -43,7 +43,7 @@

Check it yourself

    -
  1. 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.
  2. +
  3. Open the contract on Polygonscan (link above). Its source code is verified on Sourcify (exact match).
  4. On Polygonscan, choose Read Contract and compare owner, prize wallet, company and keeper with this page.
  5. Open any purchase in the live ledger and look at its Logs: one Purchase event, then one Paid event per payment.
@@ -51,7 +51,7 @@ - +