Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
refcell committed Oct 11, 2023
1 parent 7bf2cf4 commit f9a82b0
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 19 deletions.
1 change: 1 addition & 0 deletions crates/stages/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ pub trait Stage {

/// Core Stages.
pub mod stages;
pub use stages::Stages;
12 changes: 8 additions & 4 deletions crates/stages/src/stages/batcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@ impl crate::Stage for Batcher {
.flatten()
.ok_or(eyre::eyre!("missing dockerfile directory"))?;

let addresses = self
.addresses
.as_ref()
.ok_or(eyre::eyre!("missing addresses"))?;
// let addresses = self
// .addresses
// .as_ref()
// .ok_or(eyre::eyre!("missing addresses"))?;

let proj_root = project_root::get_project_root()?;
let addresses_json_file = proj_root.as_path().join(".devnet").join("addresses.json");
let addresses = crate::json::read_json(&addresses_json_file)?;

let genesis_rollup_file = self
.genesis_rollup_file
Expand Down
14 changes: 9 additions & 5 deletions crates/stages/src/stages/challenger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,21 @@ impl crate::Stage for Challenger {
.flatten()
.ok_or(eyre::eyre!("challenger stage missing dockerfile directory"))?;

let addresses = self
.addresses
.as_ref()
.ok_or(eyre::eyre!("challenger stage missing addresses"))?;
// let addresses = self
// .addresses
// .as_ref()
// .ok_or(eyre::eyre!("challenger stage missing addresses"))?;

let proj_root = project_root::get_project_root()?;
let addresses_json_file = proj_root.as_path().join(".devnet").join("addresses.json");
let addresses = crate::json::read_json(&addresses_json_file)?;

let start_challenger = Command::new("docker-compose")
.args(["up", "-d", "--no-deps", "--build", "challenger"])
.env("PWD", docker_dir)
.env("L2OO_ADDRESS", addresses["L2OutputOracleProxy"].to_string())
.env("DGF_ADDRESS", addresses["DisputeGameFactory"].to_string())
.env("CHALLENGER_AGENT_CHOICE", self.challenger)
.env("CHALLENGER_AGENT_CHOICE", &self.challenger)
.current_dir(&docker_dir)
.output()?;

Expand Down
2 changes: 1 addition & 1 deletion crates/stages/src/stages/layer_two.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl crate::Stage for LayerTwo {
let start_l2 = Command::new("docker-compose")
.args(["up", "-d", "--no-deps", "--build", "l2"])
.env("PWD", docker_dir)
.env("L2_CLIENT_CHOICE", self.l2_client)
.env("L2_CLIENT_CHOICE", &self.l2_client)
.current_dir(&docker_dir)
.output()?;

Expand Down
12 changes: 8 additions & 4 deletions crates/stages/src/stages/proposer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@ impl crate::Stage for Proposer {
.flatten()
.ok_or(eyre::eyre!("missing dockerfile directory"))?;

let addresses = self
.addresses
.as_ref()
.ok_or(eyre::eyre!("missing addresses"))?;
// let addresses = self
// .addresses
// .as_ref()
// .ok_or(eyre::eyre!("missing addresses"))?;

let proj_root = project_root::get_project_root()?;
let addresses_json_file = proj_root.as_path().join(".devnet").join("addresses.json");
let addresses = crate::json::read_json(&addresses_json_file)?;

let start_proposer = Command::new("docker-compose")
.args(["up", "-d", "--no-deps", "--build", "proposer"])
Expand Down
2 changes: 1 addition & 1 deletion crates/stages/src/stages/rollup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl crate::Stage for Rollup {
let start_rollup = Command::new("docker-compose")
.args(["up", "-d", "--no-deps", "--build", "rollup-client"])
.env("PWD", docker_dir)
.env("ROLLUP_CLIENT_CHOICE", self.rollup_client)
.env("ROLLUP_CLIENT_CHOICE", &self.rollup_client)
.current_dir(&docker_dir)
.output()?;

Expand Down
12 changes: 8 additions & 4 deletions crates/stages/src/stages/stateviz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@ impl crate::Stage for Stateviz {
.flatten()
.ok_or(eyre::eyre!("stateviz stage missing dockerfile directory"))?;

let addresses = self
.addresses
.as_ref()
.ok_or(eyre::eyre!("stateviz stage missing addresses"))?;
// let addresses = self
// .addresses
// .as_ref()
// .ok_or(eyre::eyre!("stateviz stage missing addresses"))?;

let proj_root = project_root::get_project_root()?;
let addresses_json_file = proj_root.as_path().join(".devnet").join("addresses.json");
let addresses = crate::json::read_json(&addresses_json_file)?;

let start_stateviz = Command::new("docker-compose")
.args(["up", "-d", "--no-deps", "--build", "stateviz"])
Expand Down

0 comments on commit f9a82b0

Please sign in to comment.