From 0cfe5bbb8a61d09d683f7cd11e986885a3167684 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Mon, 15 Aug 2022 17:23:13 +0000 Subject: [PATCH] cleanup --- TODO.md | 4 +++- .../src/bin/web3_proxy_cli/check_config.rs | 16 ++++++++++++++++ .../bin/web3_proxy_cli/{two.rs => example.rs} | 0 web3_proxy/src/bin/web3_proxy_cli/main.rs | 4 ++-- 4 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 web3_proxy/src/bin/web3_proxy_cli/check_config.rs rename web3_proxy/src/bin/web3_proxy_cli/{two.rs => example.rs} (100%) diff --git a/TODO.md b/TODO.md index 906e571e..fda6e646 100644 --- a/TODO.md +++ b/TODO.md @@ -247,4 +247,6 @@ in another repo: event subscriber eth_1 | 2022-08-10T23:26:10.195014Z WARN web3_proxy::connections: chain is forked! 262 possible heads. 1/2/5/5 rpcs have 0x0538…bfff eth_1 | 2022-08-10T23:26:10.195658Z WARN web3_proxy::connections: chain is forked! 262 possible heads. 2/3/5/5 rpcs have 0x0538…bfff - [ ] disable redis persistence in dev -- [ ] fix ip detection when running in dev \ No newline at end of file +- [ ] fix ip detection when running in dev +- [ ] cache api keys that are not in the database? +- [ ] double check weight sorting code diff --git a/web3_proxy/src/bin/web3_proxy_cli/check_config.rs b/web3_proxy/src/bin/web3_proxy_cli/check_config.rs new file mode 100644 index 00000000..c41581df --- /dev/null +++ b/web3_proxy/src/bin/web3_proxy_cli/check_config.rs @@ -0,0 +1,16 @@ +use argh::FromArgs; + +#[derive(FromArgs, PartialEq, Debug)] +/// Second subcommand. +#[argh(subcommand, name = "check_config")] +pub struct CheckConfigSubCommand { + #[argh(switch)] + /// whether to fooey + fooey: bool, +} + +impl CheckConfigSubCommand { + pub async fn main(self) -> anyhow::Result<()> { + todo!() + } +} diff --git a/web3_proxy/src/bin/web3_proxy_cli/two.rs b/web3_proxy/src/bin/web3_proxy_cli/example.rs similarity index 100% rename from web3_proxy/src/bin/web3_proxy_cli/two.rs rename to web3_proxy/src/bin/web3_proxy_cli/example.rs diff --git a/web3_proxy/src/bin/web3_proxy_cli/main.rs b/web3_proxy/src/bin/web3_proxy_cli/main.rs index a9b97968..293a8f52 100644 --- a/web3_proxy/src/bin/web3_proxy_cli/main.rs +++ b/web3_proxy/src/bin/web3_proxy_cli/main.rs @@ -1,5 +1,5 @@ +mod check_config; mod create_user; -mod two; use argh::FromArgs; use web3_proxy::app::get_migrated_db; @@ -23,7 +23,7 @@ pub struct TopConfig { #[argh(subcommand)] enum SubCommand { CreateUser(create_user::CreateUserSubCommand), - Two(two::SubCommandTwo), + CheckConfig(check_config::CheckConfigSubCommand), // TODO: sub command to downgrade migrations? // TODO: sub command to add new api keys to an existing user? }