Remove artifacts for serai-processor-ethereum-contracts

This commit is contained in:
Luke Parker
2024-09-15 12:04:57 -04:00
parent 3f0f4d520d
commit 39be23d807
15 changed files with 5501 additions and 69 deletions

View File

@@ -12,6 +12,13 @@ pub fn build(
contracts_path: &str,
artifacts_path: &str,
) -> Result<(), String> {
if !fs::exists(artifacts_path)
.map_err(|e| format!("couldn't check if artifacts directory already exists: {e:?}"))?
{
fs::create_dir(artifacts_path)
.map_err(|e| format!("couldn't create the non-existent artifacts directory: {e:?}"))?;
}
println!("cargo:rerun-if-changed={contracts_path}/*");
println!("cargo:rerun-if-changed={artifacts_path}/*");

View File

@@ -1,9 +1,4 @@
use std::{env, fs};
fn main() {
let artifacts_path = env::var("OUT_DIR").unwrap().to_string() + "/ethereum-schnorr-contract";
if !fs::exists(&artifacts_path).unwrap() {
fs::create_dir(&artifacts_path).unwrap();
}
let artifacts_path = std::env::var("OUT_DIR").unwrap().to_string() + "/ethereum-schnorr-contract";
build_solidity_contracts::build(&[], "contracts", &artifacts_path).unwrap();
}