Skip to content

Commit

Permalink
Don't configure demo L2 address, since we always deploy it
Browse files Browse the repository at this point in the history
  • Loading branch information
jbearer committed Sep 22, 2023
1 parent fc1616e commit b87ecbb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
4 changes: 0 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ pub struct Options {
#[clap(long, env = "ESPRESSO_DEMO_HOTSHOT_ADDRESS")]
pub hotshot_address: Address,

/// Address of Rollup contract on layer 1.
#[clap(long, env = "ESPRESSO_DEMO_ROLLUP_ADDRESS")]
pub rollup_address: Address,

/// Mnemonic phrase for the rollup wallet.
///
/// This is the wallet that will be used to send batch proofs of transaction validity to the rollup
Expand Down
22 changes: 11 additions & 11 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,6 @@ async fn main() {
sequencer_url: opt.sequencer_url.clone(),
};

let executor_options = ExecutorOptions {
hotshot_address: opt.hotshot_address,
l1_provider: opt.l1_provider.clone(),
rollup_account_index: opt.rollup_account_index,
rollup_address: opt.rollup_address,
rollup_mnemonic: opt.rollup_mnemonic.clone(),
sequencer_url: opt.sequencer_url.clone(),
output_stream: None,
};

let serve_api = async {
serve(&api_options, state.clone()).await.unwrap();
};
Expand All @@ -62,7 +52,17 @@ async fn main() {
let test_system = TestL1System::new(provider, opt.hotshot_address)
.await
.unwrap();
deploy_example_contract(&test_system, initial_state).await;
let rollup_contract = deploy_example_contract(&test_system, initial_state).await;

let executor_options = ExecutorOptions {
hotshot_address: opt.hotshot_address,
l1_provider: opt.l1_provider.clone(),
rollup_address: rollup_contract.address(),
rollup_account_index: opt.rollup_account_index,
rollup_mnemonic: opt.rollup_mnemonic.clone(),
sequencer_url: opt.sequencer_url.clone(),
output_stream: None,
};

tracing::info!("Launching Example Rollup API and Executor");
join!(run_executor(&executor_options, state.clone()), serve_api,);
Expand Down

0 comments on commit b87ecbb

Please sign in to comment.