This commit is contained in:
wei
2025-06-14 18:52:46 +08:00
parent 1ac52b03a9
commit af2afcbb60
5 changed files with 16 additions and 4 deletions
+9
View File
@@ -640,6 +640,15 @@ impl PumpFun {
Ok(actual_sol_reserves)
}
#[inline]
pub async fn get_creator(&self, mint: &Pubkey) -> Result<Pubkey, anyhow::Error> {
let (bonding_curve, _) = pumpfun::common::get_bonding_curve_account_v2(&self.rpc, mint).await?;
let creator = bonding_curve.creator;
Ok(creator)
}
#[inline]
pub async fn get_current_price_with_pumpswap(&self, pool_address: &Pubkey) -> Result<f64, anyhow::Error> {
let pool = pumpswap::pool::Pool::fetch(&self.rpc, pool_address).await?;