-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathconfig.rs
43 lines (37 loc) · 953 Bytes
/
config.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
use serde::Deserialize;
use solana_sdk::pubkey::Pubkey;
#[derive(Debug, Deserialize, Clone)]
pub struct Config {
pub solana: SolanaConfig,
pub bot: BotConfig,
pub dexes: DexesConfig,
pub monitoring: MonitoringConfig,
pub logging: LoggingConfig,
}
#[derive(Debug, Deserialize, Clone)]
pub struct SolanaConfig {
pub rpc_url: String,
pub ws_url: String,
pub commitment: String,
}
#[derive(Debug, Deserialize, Clone)]
pub struct BotConfig {
pub keypair_path: String,
pub profit_threshold: f64,
pub max_position_size: f64,
}
#[derive(Debug, Deserialize, Clone)]
pub struct DexesConfig {
pub raydium_program_id: Pubkey,
pub serum_program_id: Pubkey,
pub orca_program_id: Pubkey,
}
#[derive(Debug, Deserialize, Clone)]
pub struct MonitoringConfig {
pub dashboard_port: u16,
pub update_interval: u64,
}
#[derive(Debug, Deserialize, Clone)]
pub struct LoggingConfig {
pub level: String,
}