diff --git a/crytic_compile/platform/etherscan.py b/crytic_compile/platform/etherscan.py index 5904c4c..21c0b44 100644 --- a/crytic_compile/platform/etherscan.py +++ b/crytic_compile/platform/etherscan.py @@ -312,6 +312,8 @@ def compile(self, crytic_compile: "CryticCompile", **kwargs: str) -> None: only_bytecode = kwargs.get("etherscan_only_bytecode", False) etherscan_api_key = kwargs.get("etherscan_api_key", None) + if etherscan_api_key is None: + etherscan_api_key = os.getenv("ETHERSCAN_API_KEY") export_dir = kwargs.get("export_dir", "crytic-export") export_dir = os.path.join(