Skip to content

Commit 94911af

Browse files
committed
chore: add base, gnosis, polygonzkevm
1 parent ac316ec commit 94911af

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

crytic_compile/platform/etherscan.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@
5050
"testnet.avax:": ("-testnet.snowtrace.io", "testnet.snowtrace.io"),
5151
"ftm:": (".ftmscan.com", "ftmscan.com"),
5252
"goerli.base:": ("-goerli.basescan.org", "goerli.basescan.org"),
53+
"base:": (".basescan.org", "basescan.org"),
54+
"gno:": (".gnosisscan.io", "gnosisscan.io"),
55+
"polyzk:": ("-zkevm.polygonscan.com", "zkevm.polygonscan.com"),
5356
}
5457

5558

@@ -237,6 +240,9 @@ def compile(self, crytic_compile: "CryticCompile", **kwargs: str) -> None:
237240
ftmscan_api_key = kwargs.get("ftmscan_api_key", None)
238241
bscan_api_key = kwargs.get("bscan_api_key", None)
239242
optim_api_key = kwargs.get("optim_api_key", None)
243+
base_api_key = kwargs.get("base_api_key", None)
244+
gno_api_key = kwargs.get("gno_api_key", None)
245+
polyzk_api_key = kwargs.get("polyzk_api_key", None)
240246

241247
export_dir = kwargs.get("export_dir", "crytic-export")
242248
export_dir = os.path.join(
@@ -267,6 +273,15 @@ def compile(self, crytic_compile: "CryticCompile", **kwargs: str) -> None:
267273
if optim_api_key and "optim" in etherscan_url:
268274
etherscan_url += f"&apikey={optim_api_key}"
269275
etherscan_bytecode_url += f"&apikey={optim_api_key}"
276+
if base_api_key and "base" in etherscan_url:
277+
etherscan_url += f"&apikey={base_api_key}"
278+
etherscan_bytecode_url += f"&apikey={base_api_key}"
279+
if gno_api_key and "gno" in etherscan_url:
280+
etherscan_url += f"&apikey={gno_api_key}"
281+
etherscan_bytecode_url += f"&apikey={gno_api_key}"
282+
if polyzk_api_key and "zkevm" in etherscan_url:
283+
etherscan_url += f"&apikey={polyzk_api_key}"
284+
etherscan_bytecode_url += f"&apikey={polyzk_api_key}"
270285

271286
source_code: str = ""
272287
result: Dict[str, Union[bool, str, int]] = {}

0 commit comments

Comments
 (0)