Skip to content

chore(fortuna): make fortuna a library crate #2373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/fortuna/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name = "fortuna"
version = "7.4.1"
edition = "2021"

[lib]
name = "fortuna"
path = "src/lib.rs"

[dependencies]
anyhow = "1.0.75"
axum = { version = "0.6.20", features = ["json", "ws", "macros"] }
Expand Down
4 changes: 2 additions & 2 deletions apps/fortuna/src/chain.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pub(crate) mod ethereum;
pub(crate) mod reader;
pub mod ethereum;
pub mod reader;
2 changes: 1 addition & 1 deletion apps/fortuna/src/command/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ pub async fn run_keeper(
rpc_metrics: Arc<RpcMetrics>,
) -> Result<()> {
let mut handles = Vec::new();
let keeper_metrics = Arc::new({
let keeper_metrics: Arc<KeeperMetrics> = Arc::new({
let chain_labels: Vec<(String, Address)> = chains
.iter()
.map(|(id, state)| (id.clone(), state.provider_address))
Expand Down
7 changes: 7 additions & 0 deletions apps/fortuna/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pub mod api;
pub mod chain;
pub mod command;
pub mod config;
pub mod eth_utils;
pub mod keeper;
pub mod state;
15 changes: 6 additions & 9 deletions apps/fortuna/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#![allow(clippy::just_underscores_and_digits)]

use {anyhow::Result, clap::Parser, std::io::IsTerminal};

pub mod api;
pub mod chain;
pub mod command;
pub mod config;
pub mod eth_utils;
pub mod keeper;
pub mod state;
use {
anyhow::Result,
clap::Parser,
fortuna::{command, config},
std::io::IsTerminal,
};

// Server TODO list:
// - Tests
Expand Down
Loading