From 8bd383594e2b5f075a219f6c12ba6eb96717bb9c Mon Sep 17 00:00:00 2001 From: fredlacs <32464905+fredlacs@users.noreply.github.com> Date: Fri, 18 Aug 2023 05:04:35 -0300 Subject: [PATCH] feat: add contract verification exception for L2 precompiles (#19) --- checks/check-targets-verified-etherscan.ts | 2 ++ utils/constants.ts | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/checks/check-targets-verified-etherscan.ts b/checks/check-targets-verified-etherscan.ts index e7e94079a70..93f8664b5c5 100644 --- a/checks/check-targets-verified-etherscan.ts +++ b/checks/check-targets-verified-etherscan.ts @@ -2,6 +2,7 @@ import { JsonRpcProvider } from '@ethersproject/providers' import { bullet, toAddressLink, getExplorer } from '../presentation/report' import { ProposalCheck, TenderlySimulation } from '../types' import { getProvider } from '../utils/utils' +import { ARBITRUM_PRECOMPILES } from '../utils/constants' /** * Check all targets with code are verified on Etherscan @@ -40,6 +41,7 @@ async function checkVerificationStatuses( const address = toAddressLink(addr, false, getExplorer(sim.simulation.network_id)) if (status === 'eoa') info.push(bullet(`${address}: EOA (verification not applicable)`)) else if (status === 'verified') info.push(bullet(`${address}: Contract (verified)`)) + else if (ARBITRUM_PRECOMPILES.has(addr)) info.push(`${address}: Arbitrum Precompile (verification not applicable)`) else info.push(bullet(`${address}: Contract (not verified)`)) } return info diff --git a/utils/constants.ts b/utils/constants.ts index 47fd1344367..efa959c7b16 100644 --- a/utils/constants.ts +++ b/utils/constants.ts @@ -33,3 +33,7 @@ export const SIM_NAME = process.env.SIM_NAME ? process.env.SIM_NAME : null export const DAO_NAME = process.env.DAO_NAME ? process.env.DAO_NAME : null export const GOVERNOR_ADDRESS = process.env.GOVERNOR_ADDRESS ? process.env.GOVERNOR_ADDRESS : null export const REPORTS_BRANCH = 'reports' + +export const ARBITRUM_PRECOMPILES = new Set([ + "0x0000000000000000000000000000000000000064", // ArbSys +])