Skip to content

Commit 37e8e60

Browse files
fix: update explorer URL printed after proof submission (#1989)
1 parent 2e9d5db commit 37e8e60

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

crates/cli/src/main.rs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ async fn main() -> Result<(), AlignedError> {
584584
info!("Submitting proofs to the Aligned batcher...");
585585

586586
let aligned_verification_data_vec = submit_multiple(
587-
submit_args.network.into(),
587+
submit_args.network.clone().into(),
588588
&verification_data_arr,
589589
max_fee_wei,
590590
wallet.clone(),
@@ -622,9 +622,20 @@ async fn main() -> Result<(), AlignedError> {
622622
}
623623

624624
for batch_merkle_root in unique_batch_merkle_roots {
625+
let base_url = match submit_args.network.clone().into() {
626+
Network::Holesky => "https://holesky.explorer.alignedlayer.com/batches/0x",
627+
Network::HoleskyStage => "https://stage.explorer.alignedlayer.com/batches/0x",
628+
Network::Mainnet => "https://explorer.alignedlayer.com/batches/0x",
629+
Network::MainnetStage => {
630+
"https://mainnetstage.explorer.alignedlayer.com/batches/0x"
631+
}
632+
Network::Devnet => "http://localhost:4000/batches/0x",
633+
_ => "http://localhost:4000/batches/0x",
634+
};
635+
625636
info!(
626-
"https://explorer.alignedlayer.com/batches/0x{}",
627-
hex::encode(batch_merkle_root)
637+
"{}",
638+
base_url.to_string() + hex::encode(batch_merkle_root).as_str()
628639
);
629640
}
630641
}

0 commit comments

Comments
 (0)