diff --git a/crates/common/src/compile.rs b/crates/common/src/compile.rs index 1be6dca58bb5f..ed90bac7a2e5a 100644 --- a/crates/common/src/compile.rs +++ b/crates/common/src/compile.rs @@ -12,6 +12,7 @@ use foundry_compilers::{ compilers::{ Compiler, solc::{Solc, SolcCompiler}, + vyper::{Vyper, VyperSettings}, }, info::ContractInfo as CompilerContractInfo, multi::{MultiCompiler, MultiCompilerSettings}, @@ -533,20 +534,38 @@ pub fn etherscan_project(metadata: &Metadata, target_path: &Path) -> Result::default() - .settings(MultiCompilerSettings { + let compiler_settings = if is_vyper { + // For Vyper, use default VyperSettings + // Note: metadata.settings() returns Solidity settings, so we use defaults for Vyper + MultiCompilerSettings { solc: Default::default(), vyper: VyperSettings::default() } + } else { + // For Solidity, use the settings from metadata + MultiCompilerSettings { solc: SolcSettings { settings: SolcConfig::builder().settings(settings).build(), ..Default::default() }, - ..Default::default() - }) + vyper: Default::default(), + } + }; + + Ok(ProjectBuilder::::default() + .settings(compiler_settings) .paths(paths) .ephemeral() .no_artifacts()