diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 72d804c..e86333e 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -78,7 +78,7 @@ export const getContractInformation = async ( } } catch (e) { consola.error('Address: ', address, 'ChainId: ', chainId, 'Error: ', e) - throw new Error('Contract not found') + return { name: 'Unverified', address, abi: [] } } } @@ -108,7 +108,6 @@ export const getCachedContractInformation = async ( // Don't cache unverified contracts if (contract.name === 'Unverified') { consola.info('Contract is unverified.') - console.log(contract) return contract } diff --git a/src/routes/diamond/[address]/json/+server.ts b/src/routes/diamond/[address]/json/+server.ts index 63a9337..ad60962 100644 --- a/src/routes/diamond/[address]/json/+server.ts +++ b/src/routes/diamond/[address]/json/+server.ts @@ -46,12 +46,13 @@ export const GET: RequestHandler = async ({ params, url, locals }) => { facets: [], } + console.log(diamond) + // Fetch all facet information for (const [address, selectors] of facetData) { try { const facet = await buildFacet(address, selectors, chain.id, locals.db) if (!facet) continue - if (facet.name === 'Unverified') continue diamond.facets.push(facet) diamondAbi = [...diamondAbi, ...facet.abi] } catch (e) {