Skip to content

Commit 30a8200

Browse files
committed
try again boi
1 parent 2b7150b commit 30a8200

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

crytic_compile/cryticparser/cryticparser.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,14 @@ def _init_etherscan(parser: ArgumentParser) -> None:
328328
default=DEFAULTS_FLAG_IN_CONFIG["etherscan_api_key"],
329329
)
330330

331+
group_etherscan.add_argument(
332+
"--test-polygonscan-apikey",
333+
help="Etherscan API key.",
334+
action="store",
335+
dest="test_polygonscan_api_key",
336+
default=DEFAULTS_FLAG_IN_CONFIG["etherscan_api_key"],
337+
)
338+
331339
group_etherscan.add_argument(
332340
"--avax-apikey",
333341
help="Etherscan API key.",

crytic_compile/platform/etherscan.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ def compile(self, crytic_compile: "CryticCompile", **kwargs: str) -> None:
216216
etherscan_api_key = kwargs.get("etherscan_api_key", None)
217217
arbiscan_api_key = kwargs.get("arbiscan_api_key", None)
218218
polygonscan_api_key = kwargs.get("polygonscan_api_key", None)
219+
test_polygonscan_api_key = kwargs.get("test_polygonscan_api_key", None)
219220
avax_api_key = kwargs.get("avax_api_key", None)
220221
ftmscan_api_key = kwargs.get("ftmscan_api_key", None)
221222
bscan_api_key = kwargs.get("bscan_api_key", None)
@@ -235,6 +236,9 @@ def compile(self, crytic_compile: "CryticCompile", **kwargs: str) -> None:
235236
if polygonscan_api_key and "polygonscan" in etherscan_url:
236237
etherscan_url += f"&apikey={polygonscan_api_key}"
237238
etherscan_bytecode_url += f"&apikey={polygonscan_api_key}"
239+
if test_polygonscan_api_key and "polygonscan" in etherscan_url:
240+
etherscan_url += f"&apikey={test_polygonscan_api_key}"
241+
etherscan_bytecode_url += f"&apikey={test_polygonscan_api_key}"
238242
if avax_api_key and "snowtrace" in etherscan_url:
239243
etherscan_url += f"&apikey={avax_api_key}"
240244
etherscan_bytecode_url += f"&apikey={avax_api_key}"

0 commit comments

Comments
 (0)