Logging and testing buying

This commit is contained in:
2026-08-06 04:03:34 +02:00
parent e8e7a8efba
commit 367127a125
4 changed files with 213 additions and 9 deletions
+17
View File
@@ -1,17 +1,34 @@
use pump_rust_client::PumpSdk;
use crate::executor::Executor;
pub const PROGRAM_ID: &str = "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P";
pub struct PumpFun {
pub private_key: String,
pub sdk: PumpSdk,
}
impl Executor for PumpFun {
async fn buy(&self, token: solana_sdk::pubkey::Pubkey, amount: f64) -> anyhow::Result<()> {
log::info!("Buying {token}");
// self.sdk.buy_v2_instructions(
// global,
// bonding_curve,
// base_mint,
// quote_token_program,
// user,
// amount,
// max_quote_tokens,
// );
Ok(())
}
async fn sell(&self, token: solana_sdk::pubkey::Pubkey, amount: f64) -> anyhow::Result<()> {
log::info!("Selling {token}");
Ok(())
}
}