From 203eeffa858154de02dc79b904b0f4dfadde3809 Mon Sep 17 00:00:00 2001 From: Dmitri Makarov Date: Mon, 30 Dec 2024 12:32:04 -0500 Subject: [PATCH] Move sys main to bin/ and rename --- src/{main.rs => bin/sys.rs} | 9 ++------- src/db.rs | 3 +-- src/lib.rs | 5 +++++ 3 files changed, 8 insertions(+), 9 deletions(-) rename src/{main.rs => bin/sys.rs} (99%) diff --git a/src/main.rs b/src/bin/sys.rs similarity index 99% rename from src/main.rs rename to src/bin/sys.rs index 2fb2624..6de229b 100644 --- a/src/main.rs +++ b/src/bin/sys.rs @@ -1,11 +1,4 @@ -mod amount; -mod db; -mod field_as_string; -mod get_transaction_balance_change; -mod rpc_client_utils; - use { - crate::{amount::Amount, get_transaction_balance_change::*}, chrono::prelude::*, chrono_humanize::HumanTime, clap::{ @@ -44,7 +37,9 @@ use { time::Duration, }, sys::{ + amount::Amount, exchange::{self, *}, + get_transaction_balance_change::*, metrics::{self, dp, MetricsConfig}, notifier::*, priority_fee::{apply_priority_fee, PriorityFee}, diff --git a/src/db.rs b/src/db.rs index dc79366..169b4ae 100644 --- a/src/db.rs +++ b/src/db.rs @@ -1,5 +1,5 @@ use { - crate::{field_as_string, metrics::MetricsConfig}, + crate::{exchange::*, field_as_string, metrics::MetricsConfig, token::*}, chrono::{prelude::*, NaiveDate}, pickledb::{PickleDb, PickleDbDumpPolicy}, rust_decimal::prelude::*, @@ -17,7 +17,6 @@ use { time::{SystemTime, UNIX_EPOCH}, }, strum::{EnumString, IntoStaticStr}, - sys::{exchange::*, token::*}, thiserror::Error, }; diff --git a/src/lib.rs b/src/lib.rs index 8a7b6e2..e5ecfb6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,15 +11,20 @@ use { }, }; +pub mod amount; pub mod binance_exchange; pub mod coin_gecko; pub mod coinbase_exchange; +pub mod db; pub mod exchange; +pub mod field_as_string; +pub mod get_transaction_balance_change; pub mod helius_rpc; pub mod kraken_exchange; pub mod metrics; pub mod notifier; pub mod priority_fee; +pub mod rpc_client_utils; pub mod token; pub mod vendor;