mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
Remove ethers-solc
ethers-solc was used for a type (now manually specified) and to call out to solc. Since Foundry was already a documented dependency, a call to it now handles building. Removing this single crate removes a total of 17 crates from our dependency tree. While these may still be around due to Foundry, they at least may not be. Further work to remove the requirement on Foundry for solc alone would be appreciated.
This commit is contained in:
@@ -29,10 +29,6 @@ ethers-signers = { version = "2", default-features = false }
|
||||
ethers-middleware = { version = "2", default-features = false }
|
||||
ethers-providers = { version = "2", default-features = false }
|
||||
ethers-contract = { version = "2", default-features = false, features = ["abigen", "providers"] }
|
||||
ethers-solc = { version = "2", default-features = false }
|
||||
|
||||
[build-dependencies]
|
||||
ethers-solc = { version = "2", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
rand_core = { version = "0.6", default-features = false, features = ["std"] }
|
||||
|
||||
@@ -1,16 +1,7 @@
|
||||
use ethers_solc::{Project, ProjectPathsConfig};
|
||||
|
||||
fn main() {
|
||||
println!("cargo:rerun-if-changed=contracts");
|
||||
println!("cargo:rerun-if-changed=artifacts");
|
||||
println!("cargo:rerun-if-changed=foundry.toml");
|
||||
|
||||
// configure the project with all its paths, solc, cache etc.
|
||||
let project = Project::builder()
|
||||
.paths(ProjectPathsConfig::hardhat(env!("CARGO_MANIFEST_DIR")).unwrap())
|
||||
.build()
|
||||
.unwrap();
|
||||
project.compile().unwrap();
|
||||
|
||||
// Tell Cargo that if a source file changes, to rerun this build script.
|
||||
project.rerun_if_sources_changed();
|
||||
assert!(std::process::Command::new("forge").args(["build"]).status().unwrap().success());
|
||||
}
|
||||
|
||||
6
coins/ethereum/foundry.toml
Normal file
6
coins/ethereum/foundry.toml
Normal file
@@ -0,0 +1,6 @@
|
||||
[profile.default]
|
||||
src = "contracts"
|
||||
out = "artifacts"
|
||||
|
||||
optimizer = true
|
||||
optimizer_runs = 20_000
|
||||
Reference in New Issue
Block a user