Skip to content

Commit dbee2c1

Browse files
committed
platform: etherscan: support ETHERSCAN_API_KEY environment variable
Fixes #567
1 parent abcaaf0 commit dbee2c1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crytic_compile/platform/etherscan.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ def compile(self, crytic_compile: "CryticCompile", **kwargs: str) -> None:
312312
only_bytecode = kwargs.get("etherscan_only_bytecode", False)
313313

314314
etherscan_api_key = kwargs.get("etherscan_api_key", None)
315+
if etherscan_api_key is None:
316+
etherscan_api_key = os.getenv("ETHERSCAN_API_KEY")
315317

316318
export_dir = kwargs.get("export_dir", "crytic-export")
317319
export_dir = os.path.join(

0 commit comments

Comments
 (0)