Obtain liquidity of the pool

This commit is contained in:
wei
2025-06-11 21:08:02 +08:00
parent 6f819be4e0
commit 1743fecf1a
+9
View File
@@ -603,4 +603,13 @@ impl PumpFun {
Ok(actual_sol_reserves)
}
#[inline]
pub async fn get_real_sol_reserves_with_pumpswap(&self, pool_address: &Pubkey) -> Result<u64, anyhow::Error> {
let pool = pumpswap::pool::Pool::fetch(&self.rpc, pool_address).await?;
let (_, quote_amount) = pool.get_token_balances(&self.rpc).await?;
Ok(quote_amount)
}
}