From c2d20ee2b90421fda37746e366be5e5a4a9bb84a Mon Sep 17 00:00:00 2001 From: 0xKitsune <0xKitsune@protonmail.com> Date: Mon, 29 Jul 2024 14:55:48 -0400 Subject: [PATCH] implement endpoint command --- bin/opt8n/src/opt8n.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/opt8n/src/opt8n.rs b/bin/opt8n/src/opt8n.rs index 25e024d..f0b6517 100644 --- a/bin/opt8n/src/opt8n.rs +++ b/bin/opt8n/src/opt8n.rs @@ -196,6 +196,9 @@ impl Opt8n { node_args.run().await?; } ReplCommand::Cast { .. } => {} + ReplCommand::RpcEndpoint => { + println!("{}", self.node_handle.http_endpoint()); + } ReplCommand::Exit => unreachable!(), } Ok(()) @@ -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 { @@ -322,6 +325,7 @@ pub enum ReplCommand { args: Vec, }, Dump, + RpcEndpoint, // TODO: implement clear // TODO: implement reset #[command(visible_alias = "e")]