feat(pumpswap): enhance flexible mint support and optimize performance

- Add base_mint/quote_mint parameters to PumpSwapParams for flexible trading pairs
- Implement pool reserves caching to reduce RPC calls and improve speed
- Refactor unified buy/sell instruction logic for different mint types
- Add volume accumulator PDA support and proper fee calculations
- Update pool discovery for both base and quote mint searches
- Bump version to 0.2.11

Breaking: PumpSwapParams now requires mint and reserves parameters
This commit is contained in:
ysq
2025-08-02 23:51:04 +08:00
parent 07a42641de
commit 45140ae789
10 changed files with 592 additions and 185 deletions
-2
View File
@@ -14,8 +14,6 @@ pub async fn get_token_balance(
payer: &Pubkey,
mint: &Pubkey,
) -> Result<u64, anyhow::Error> {
println!("payer: {:?}", payer);
println!("mint: {:?}", mint);
let ata = get_associated_token_address(payer, mint);
let balance = rpc.get_token_account_balance(&ata).await?;
let balance_u64 = balance