Event listener

This commit is contained in:
2026-08-07 16:13:50 +02:00
parent bd9f883a94
commit e7ec2dece9
2 changed files with 34 additions and 17 deletions
+12 -1
View File
@@ -1,10 +1,11 @@
mod pump_fun;
use crate::launchpad::pump_fun::PumpFun;
use anyhow::Context;
use helius::Helius;
use rust_decimal::Decimal;
use std::{collections::HashMap, sync::Arc};
use tokio::sync::Mutex;
use tokio::sync::{Mutex, mpsc};
pub struct Executor {
pub client: Helius,
@@ -89,4 +90,14 @@ impl Executor {
Ok(())
}
pub async fn listen(self: &Arc<Self>) -> anyhow::Result<mpsc::Receiver<u32>> {
let (tx, rx) = mpsc::channel(10);
let ws = self.client.ws().context("Failed to get WebSocket")?;
tokio::spawn(async move {});
Ok(rx)
}
}