1
0
mirror of https://github.com/mortdeus/legacy-cc.git synced 2026-10-09 12:22:24 +00:00
Files
mortdeus_legacy-cc/#_sniper (Rust) using jito Shred stream/shared_state/state.rs
cryptoking1106 086ec82844 init
2025-09-18 18:12:50 -03:00

22 lines
549 B
Rust

// shared_state/src/lib.rs
use std::collections::{HashMap, HashSet};
use std::sync::Arc;
use tokio::sync::Mutex;
use lazy_static::lazy_static;
#[derive(Debug, Clone)]
pub struct TokenTrackingState {
pub mint: String,
pub first_buyer: Option<String>,
pub first_buy_amount: f64,
pub suspected_creators: HashSet<String>,
pub sell_detected: bool,
pub sell_split_ratio: usize,
}
lazy_static! {
pub static ref TRACKED_TOKENS: Arc<Mutex<HashMap<String, TokenTrackingState>>> =
Arc::new(Mutex::new(HashMap::new()));
}