Skip to content

Commit

Permalink
Merge pull request #56 from ethereum-optimism/0xkitsune/endpoint
Browse files Browse the repository at this point in the history
feat(opt8n): Implement `RpcEndpoint` repl command
  • Loading branch information
refcell authored Jul 29, 2024
2 parents 6299afa + c2d20ee commit 7070703
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/opt8n/src/opt8n.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ impl Opt8n {
node_args.run().await?;
}
ReplCommand::Cast { .. } => {}
ReplCommand::RpcEndpoint => {
println!("{}", self.node_handle.http_endpoint());
}
ReplCommand::Exit => unreachable!(),
}
Ok(())
Expand Down Expand Up @@ -309,7 +312,7 @@ impl Opt8n {
}

#[derive(Parser, Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
#[clap(rename_all = "kebab_case", infer_subcommands = true, multicall = true)]
#[clap(rename_all = "snake_case", infer_subcommands = true, multicall = true)]
pub enum ReplCommand {
#[command(visible_alias = "a")]
Anvil {
Expand All @@ -322,6 +325,7 @@ pub enum ReplCommand {
args: Vec<String>,
},
Dump,
RpcEndpoint,
// TODO: implement clear
// TODO: implement reset
#[command(visible_alias = "e")]
Expand Down

0 comments on commit 7070703

Please sign in to comment.