From 47d0c789b8554fd0e469e325ec924bd00d84d733 Mon Sep 17 00:00:00 2001 From: Juliya Smith Date: Wed, 8 May 2024 18:13:47 -0500 Subject: [PATCH] fix: handle fix --- ape_etherscan/verify.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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