Skip to content

Commit aebea8d

Browse files
authored
Merge pull request #345 from bohendo/creyzies_fix
261 dup: contracts file path must be first for transform
2 parents 441cabd + bc07da5 commit aebea8d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crytic_compile/platform/etherscan.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ def _handle_multiple_files(
152152
filtered_paths: List[str] = []
153153
for filename, source_code in source_codes.items():
154154
path_filename = PurePosixPath(filename)
155-
if "contracts" in path_filename.parts and not filename.startswith("@"):
155+
# https://etherscan.io/address/0x19bb64b80cbf61e61965b0e5c2560cc7364c6546#code has an import of erc721a/contracts/ERC721A.sol
156+
# if the full path is lost then won't compile
157+
if "contracts" == path_filename.parts[0] and not filename.startswith("@"):
156158
path_filename = PurePosixPath(
157159
*path_filename.parts[path_filename.parts.index("contracts") :]
158160
)

0 commit comments

Comments
 (0)