diff --git a/docker-compose.yml b/docker-compose.yml index 869af5f..e3379e6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,6 +17,7 @@ services: SHOP_START_BLOCK: ${SHOP_START_BLOCK:-} KEEPER_KEY: ${KEEPER_KEY:-} PRIZE_WALLET: ${PRIZE_WALLET:-} + CONTRACT_VERIFIED: ${CONTRACT_VERIFIED:-} HUB_URL: ${HUB_URL:-} HUB_SECRET: ${HUB_SECRET:-} TANK_MODE: ${TANK_MODE:-} diff --git a/proof.js b/proof.js index 05cebfd..df11753 100644 --- a/proof.js +++ b/proof.js @@ -83,7 +83,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: C.split, position: { usd: C.position.usd }, - verified: { sourcify: false, polygonscan: 'pending', sourcifyUrl: C.contractAddress ? 'https://repo.sourcify.dev/' + C.chainId + '/' + C.contractAddress : null }, + verified: { sourcify: /sourcify/i.test(process.env.CONTRACT_VERIFIED || ''), polygonscan: /polygonscan/i.test(process.env.CONTRACT_VERIFIED || '') ? 'done' : 'pending', // CONTRACT_VERIFIED=sourcify,polygonscan once each match is confirmed + sourcifyUrl: C.contractAddress ? 'https://repo.sourcify.dev/' + C.chainId + '/' + C.contractAddress : null }, ownerNote: "Marty's Tangem hardware wallet", prizeWallet: C.prizeWallet || null, live: false }; if (shop && shop.watching()) { const { Interface } = require('ethers'); diff --git a/public/assets/contract.js b/public/assets/contract.js index cfd9809..d82901c 100644 --- a/public/assets/contract.js +++ b/public/assets/contract.js @@ -10,7 +10,7 @@ if (!d.address) { el.innerHTML = 'StatusThe contract is not live yet. Its address, owner, prize pot wallet and every position will show here, read straight from Polygon.' + splitRow[0] + '' + splitRow[1] + ''; return; } const rows = [ ['Contract', addr(d.address, 'DraftPosition on ' + (d.chainId === 137 ? 'Polygon' : 'chain ' + d.chainId))], - ['Source code', 'Verified source on Polygonscan and Sourcify: ' + esc(d.verified && d.verified.polygonscan === 'pending' ? 'pending' : 'done')], + ['Source code', 'Verified source: Sourcify ' + esc(d.verified && d.verified.sourcify ? 'done' : 'pending') + ', Polygonscan ' + esc(d.verified && d.verified.polygonscan === 'done' ? 'done' : 'pending')], ['Owner', addr(d.owner, 'A Tangem hardware wallet. It can pause new sales, set the price of future positions and change the keeper. It cannot move anyone\'s money or change the split.')], ['Company', addr(d.company, '5xYourTeam. Fixed in the contract when it was deployed.')], ['Best Coach pot', addr(d.prizeWallet, 'Receives 10% of every position in the same transaction. Fixed in the contract when it was deployed. Each payout from it is listed on the ledger.')], diff --git a/public/contract.html b/public/contract.html index 2b48712..2ffd63c 100644 --- a/public/contract.html +++ b/public/contract.html @@ -27,6 +27,6 @@
- +