diff --git a/ethers-solc/src/artifact_output/mod.rs b/ethers-solc/src/artifact_output/mod.rs index fb9dc430..80586f98 100644 --- a/ethers-solc/src/artifact_output/mod.rs +++ b/ethers-solc/src/artifact_output/mod.rs @@ -577,10 +577,11 @@ pub trait ArtifactOutput { let new_yul_abi = temp_yul_artifact.clone().into_inner().0; - let abi = &artifact_file.clone().artifact.replace_abi(new_yul_abi); + let mut new_Contract = artifact_file.clone().artifact.into_compact_contract(); - println!("{:?}", artifact_file); - println!("{:?}", abi); + new_Contract.abi = new_yul_abi; + + println!("{:?}", new_Contract); //artifacts.remove_entry(&artifact_tuple.2); } diff --git a/ethers-solc/tests/project.rs b/ethers-solc/tests/project.rs index 957987f0..bd4d2d94 100644 --- a/ethers-solc/tests/project.rs +++ b/ethers-solc/tests/project.rs @@ -115,9 +115,8 @@ fn can_compile_yul_sample() { std::fs::remove_dir_all(&project.paths().artifacts).unwrap(); let compiled = project.compile().unwrap(); // Make sure ABI does exist - assert!( compiled.find("SimpleStore").is_some()); - + assert!(compiled.find("Dapp").is_some()); assert!(compiled.find("SimpleStore").is_some()); assert!(!compiled.is_unchanged());