diff --git a/crytic_compile/platform/etherscan.py b/crytic_compile/platform/etherscan.py index 7ba17efe..5483c921 100644 --- a/crytic_compile/platform/etherscan.py +++ b/crytic_compile/platform/etherscan.py @@ -362,8 +362,8 @@ def compile(self, crytic_compile: "CryticCompile", **kwargs: str) -> None: if "Proxy" in result and result["Proxy"] == "1": assert "Implementation" in result implementation = str(result["Implementation"]) - if prefix is not None: - implementation = f"{prefix}:{implementation}" + if target.startswith(tuple(SUPPORTED_NETWORK)): + implementation = f"{target[:target.find(':')]}:{implementation}" compilation_unit.implementation_address = implementation solc_standard_json.standalone_compile(filenames, compilation_unit, working_dir=working_dir)