5 Commits

Author SHA1 Message Date
0xfnzero aab0a3a143 feat(pumpswap): forward virtual quote reserve upgrade 2026-07-17 01:59:54 +08:00
0xfnzero 41187ff84f Update parser dependency and release 1.4.9 2026-05-21 17:48:52 +08:00
Wood b281a4be52 idl: sync pump_amm; parser account comments; low-latency: sequential inner parse (no thread::scope)
Made-with: Cursor
2026-03-07 11:45:40 +08:00
Wood 308a1b594e Align PumpFun with IDL and sol-parser-sdk; fix warnings; use English comments
- Sync IDL from sol-parser-sdk (pumpfun, pump_amm, add raydium_amm_v4)
- PumpFun CreateEvent: add is_cashback_enabled to CreateToken/CreateV2, parse in log decode and merge
- PumpFun TradeEvent: add ix_name, mayhem_mode, cashback_fee_basis_points, cashback, is_cashback_coin; fix Borsh size 250->274 for fixed fields; parse extension after 274
- Fix deprecation: enable solana-entry feature agave-unstable-api
- Remove unused import wide::CmpEq in simd_utils
- Replace all Chinese comments in modified code with English

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-20 00:29:01 +08:00
Wood da550e0c3a fix: correct parameter order for buy_exact_sol_in and align Raydium CPMM field names with IDL
This commit addresses two critical issues:

1. PumpFun buy_exact_sol_in Parameter Order Fix
   - Fixed incorrect parameter parsing in buy_exact_sol_in instruction
   - Created dedicated parse_buy_exact_sol_in_instruction function
   - Correct order: spendable_sol_in (SOL) first, min_tokens_out (token) second
   - Previous bug: reused parse_buy_instruction which has reversed order
   - Impact: Fixes ~4-5% of PumpFun trades that were being parsed incorrectly
   - Issue reported by community: SOL and token amounts were swapped

2. Raydium CPMM Field Naming Alignment
   - Updated PoolState struct field names to match IDL specification exactly
   - Changed token0_vault -> token_0_vault (and similar for all token fields)
   - Changed mint0_decimals -> mint_0_decimals
   - Changed protocol_fees_token0 -> protocol_fees_token_0
   - Ensures consistency with official IDL from solana-program-idls repo
   - Improves code maintainability and readability

3. IDL Files Sync
   - Added latest IDL files from https://github.com/0xfnzero/solana-program-idls
   - Includes: pumpfun, pump_amm, raydium_cpmm, raydium_clmm, raydium_pool_v4
   - Also added: meteora_amm, meteora_damm_v2, meteora_dlmm, orca_whirlpool, raydium_launchpad
   - All IDL files stored in idl/ directory for reference

Files Modified:
- src/streaming/event_parser/protocols/pumpfun/parser.rs
- src/streaming/event_parser/protocols/raydium_cpmm/types.rs
- src/streaming/event_parser/protocols/raydium_cpmm/events.rs
- src/streaming/event_parser/protocols/raydium_cpmm/parser.rs

Testing:
-  Compiles successfully (cargo build --release)
-  All field name updates verified
-  Parameter order matches IDL specification

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-23 16:47:55 +08:00