Skip to content

Commit e1966fa

Browse files
committed
contracts file path must be first for transform
1 parent 6bb6e72 commit e1966fa

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
@@ -148,7 +148,9 @@ def _handle_multiple_files(
148148
filtered_paths: List[str] = []
149149
for filename, source_code in source_codes.items():
150150
path_filename = Path(filename)
151-
if "contracts" in path_filename.parts and not filename.startswith("@"):
151+
# https://etherscan.io/address/0x19bb64b80cbf61e61965b0e5c2560cc7364c6546#code has an import of erc721a/contracts/ERC721A.sol
152+
# if the full path is lost then won't compile
153+
if "contracts" == path_filename.parts[0] and not filename.startswith("@"):
152154
path_filename = Path(*path_filename.parts[path_filename.parts.index("contracts") :])
153155

154156
filtered_paths.append(str(path_filename))

0 commit comments

Comments
 (0)