Skip to content

Commit b7005a3

Browse files
authored
chore: allow adding vyper sources with add_raw_source w/ .vy / .vyi extension (#211)
Required for foundry-rs/foundry#7909 Related: https://github.com/foundry-rs/foundry/blob/32863e7b19bc07304ad0cac2e2b018fdde295f94/crates/forge/bin/cmd/compiler.rs#L318-L319 Allow adding Vyper sources with `add_raw_source` w/ `.vy` / `.vyi` extension so it can be compiled as part of the script
1 parent 81a77b4 commit b7005a3

File tree

1 file changed

+1
-1
lines changed
  • crates/compilers/src/project_util

1 file changed

+1
-1
lines changed

crates/compilers/src/project_util/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ pub(crate) fn create_contract_file(path: &Path, content: impl AsRef<str>) -> Res
9898

9999
fn contract_file_name(name: &str) -> String {
100100
let name = name.trim();
101-
if name.ends_with(".sol") {
101+
if name.ends_with(".sol") || name.ends_with(".vy") || name.ends_with(".vyi") {
102102
name.to_string()
103103
} else {
104104
format!("{name}.sol")

0 commit comments

Comments
 (0)