Launchpad

This commit is contained in:
2026-08-07 15:41:56 +02:00
parent 2f084bab24
commit d5c446b779
5 changed files with 121 additions and 6 deletions
+45
View File
@@ -0,0 +1,45 @@
use std::collections::HashMap;
use rust_decimal::Decimal;
use crate::launchpad::Launchpad;
pub struct PumpFun {
pub positions: HashMap<String, Decimal>,
}
impl PumpFun {
pub fn new() -> Self {
Self {
positions: HashMap::new(),
}
}
}
#[allow(unused_variables)]
#[async_trait::async_trait]
impl Launchpad for PumpFun {
async fn buy(
&mut self,
mint: &str,
amount: Decimal,
priority: Decimal,
slippage: u16,
) -> anyhow::Result<()> {
Ok(())
}
async fn sell(
&mut self,
mint: &str,
amount: u8,
priority: Decimal,
slippage: u16,
) -> anyhow::Result<()> {
Ok(())
}
fn get_positions<'a>(&'a self) -> HashMap<String, Decimal> {
self.positions.clone()
}
}