Skip to content

Commit

Permalink
Merge pull request #345 from bohendo/creyzies_fix
Browse files Browse the repository at this point in the history
261 dup: contracts file path must be first for transform
  • Loading branch information
montyly committed Jan 9, 2023
2 parents 441cabd + bc07da5 commit aebea8d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crytic_compile/platform/etherscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ def _handle_multiple_files(
filtered_paths: List[str] = []
for filename, source_code in source_codes.items():
path_filename = PurePosixPath(filename)
if "contracts" in path_filename.parts and not filename.startswith("@"):
# https://etherscan.io/address/0x19bb64b80cbf61e61965b0e5c2560cc7364c6546#code has an import of erc721a/contracts/ERC721A.sol
# if the full path is lost then won't compile
if "contracts" == path_filename.parts[0] and not filename.startswith("@"):
path_filename = PurePosixPath(
*path_filename.parts[path_filename.parts.index("contracts") :]
)
Expand Down

0 comments on commit aebea8d

Please sign in to comment.