Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions crates/protocol/registry/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ fn main() {

// Copy the `superchain-registry/chainList.json` file to `etc/chainList.json`
let chain_list = format!("{src_dir}/superchain-registry/chainList.json");
let etc_dir = std::path::Path::new("etc");
if !etc_dir.exists() {
std::fs::create_dir_all(etc_dir).unwrap();
}
std::fs::copy(chain_list, "etc/chainList.json").unwrap();

// Get the `superchain-registry/superchain/configs` directory`
Expand Down Expand Up @@ -67,6 +71,6 @@ fn main() {
superchain.chains.sort_by(|a, b| a.chain_id.cmp(&b.chain_id));
}

std::fs::write("etc/configs.json", serde_json::to_string_pretty(&superchains).unwrap())
.unwrap();
let output_path = std::path::Path::new("etc/configs.json");
std::fs::write(output_path, serde_json::to_string_pretty(&superchains).unwrap()).unwrap();
}