// 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; } })();