Skip to content

Commit

Permalink
fix: settings fix
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Jul 3, 2024
1 parent 6752356 commit 1886b5e
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions ape_etherscan/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
}
_SPDX_ID_KEY = "SPDX-License-Identifier: "

ECOSYSTEMS_VERIFY_USING_JSON = ("ethereum",)
ECOSYSTEMS_VERIFY_USING_JSON = ("ethereum", "base", "blast")


class LicenseType(Enum):
Expand Down Expand Up @@ -289,8 +289,6 @@ def attempt_verification(self):

version = str(self.compiler.version)

# TODO: Fix compiler output in ape-solidity
# and/or add more validation to ethpm_types.Compiler
compiler = self.compiler
valid = True
settings = {}
Expand All @@ -299,12 +297,12 @@ def attempt_verification(self):
output_contracts = settings.get("outputSelection", {})
for contract_id in self.compiler.contractTypes or []:
parts = contract_id.split(":")
if len(parts) != 2:
# Bad compiler.
valid = False
continue
if len(parts) == 2:
_, cname = parts

else:
cname = parts[0]

_, cname = parts
if cname not in output_contracts:
valid = False
break
Expand Down Expand Up @@ -357,7 +355,7 @@ def attempt_verification(self):

def _get_new_settings(self, version: str) -> dict:
logger.warning(
"Settings missing from cached manifest. " "Attempting to re-calculate find settings."
"Settings missing from cached manifest. Attempting to re-calculate to find settings."
)

# Attempt to re-calculate settings.
Expand Down

0 comments on commit 1886b5e

Please sign in to comment.