diff --git a/ape_etherscan/verify.py b/ape_etherscan/verify.py index 947a633..1f94019 100644 --- a/ape_etherscan/verify.py +++ b/ape_etherscan/verify.py @@ -266,7 +266,14 @@ def attempt_verification(self): if compiler: settings = self.compiler.settings or {} output_contracts = settings.get("outputSelection", {}) - for cname in self.compiler.contractTypes or []: + for contract_id in self.compiler.contractTypes or []: + parts = contract_id.split(":") + if len(parts) != 2: + # Bad compiler. + valid = False + continue + + _, cname = parts if cname not in output_contracts: valid = False break