Skip to content

Commit

Permalink
fix: handle non alpha chars in contract names (#663)
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey authored Apr 17, 2022
1 parent d85544e commit 2a653a5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ape/managers/project/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ def sources(self) -> List[Path]:

for extension in self.compiler_manager.registered_compilers:
r_ext = extension.replace(".", "\\.")
files.extend(get_all_files_in_directory(self.contracts_folder, pattern=rf"\w+{r_ext}"))
files.extend(
get_all_files_in_directory(self.contracts_folder, pattern=rf"[\w|-]+{r_ext}")
)

return files

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[
{"name":"foo","type":"fallback", "stateMutability":"nonpayable"}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[
{"name":"foo","type":"fallback", "stateMutability":"nonpayable"}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[
{"name":"foo","type":"fallback", "stateMutability":"nonpayable"}
]

0 comments on commit 2a653a5

Please sign in to comment.