Skip to content

Commit

Permalink
chore: allow adding vyper sources with add_raw_source w/ .vy / `.…
Browse files Browse the repository at this point in the history
…vyi` extension (foundry-rs#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
  • Loading branch information
zerosnacks authored Oct 14, 2024
1 parent 81a77b4 commit b7005a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/compilers/src/project_util/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub(crate) fn create_contract_file(path: &Path, content: impl AsRef<str>) -> Res

fn contract_file_name(name: &str) -> String {
let name = name.trim();
if name.ends_with(".sol") {
if name.ends_with(".sol") || name.ends_with(".vy") || name.ends_with(".vyi") {
name.to_string()
} else {
format!("{name}.sol")
Expand Down

0 comments on commit b7005a3

Please sign in to comment.