This commit fixes multiple critical issues found when comparing SDK structures
with the official IDL repository (https://github.com/0xfnzero/solana-program-idls):
1. PumpSwap GlobalConfig
- Add missing reserved_fee_recipients: [Pubkey; 7] field
- Update GLOBAL_CONFIG_SIZE constant
2. PumpFun Global
- Add missing reserved_fee_recipients: [Pubkey; 7] field
- Update GLOBAL_SIZE constant
3. Raydium CPMM AmmConfig
- Add missing creator_fee_rate: u64 field
- Adjust padding from [u64; 16] to [u64; 15]
4. Raydium CPMM PoolState
- Add creator_fee_on: u8 field
- Add enable_creator_fee: bool field
- Add padding1: [u8; 6] field
- Add creator_fees_token_0: u64 field
- Add creator_fees_token_1: u64 field
- Adjust padding from [u64; 31] to [u64; 28]
5. Bonk (Raydium Launchpad) PoolState
- Add AmmCreatorFeeOn enum with borsh discriminant support
- Add token_program_flag: u8 field
- Add amm_creator_fee_on: AmmCreatorFeeOn field
- Add platform_vesting_share: u64 field
- Fix padding from [u64; 8] to [u8; 54] with serde_big_array
- Update POOL_STATE_SIZE constant
6. Bonk (Raydium Launchpad) PlatformConfig
- Add BondingCurveParam and PlatformCurveParam structures
- Fix name from Vec<u8> to [u8; 64] with serde_big_array
- Fix web from Vec<u8> to [u8; 256] with serde_big_array
- Fix img from Vec<u8> to [u8; 256] with serde_big_array
- Add cpswap_config: Pubkey field
- Add creator_fee_rate: u64 field
- Add transfer_fee_extension_auth: Pubkey field
- Add platform_vesting_wallet: Pubkey field
- Add platform_vesting_scale: u64 field
- Add platform_cp_creator: Pubkey field
- Fix padding from Vec<u8> to [u8; 108] with serde_big_array
- Add curve_params: Vec<PlatformCurveParam> field
- Update PLATFORM_CONFIG_SIZE constant
7. PumpSwap buy_exact_quote_in parameter order bug
- Create separate parse_buy_exact_quote_in_instruction function
- Fix parameter parsing order: spendable_quote_in (SOL) first, then min_base_amount_out (token)
- Previous bug: buy_exact_quote_in incorrectly reused parse_buy_instruction which has reversed parameter order
- Add detailed comments explaining the parameter order difference
All changes have been verified against the official IDL files and compile successfully.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
PumpFun and PumpSwap have additional buy instruction variants that were not being parsed:
- PumpFun: `buy_exact_sol_in` (discriminator: [56, 252, 116, 8, 158, 223, 205, 95])
- PumpSwap: `buy_exact_quote_in` (discriminator: [198, 46, 21, 82, 180, 217, 232, 112])
These discriminators are from the official PumpFun IDL:
https://github.com/pump-fun/pump-public-docs/tree/main/idl
Without this fix, approximately 4-5% of trades were being missed.
- Upgrade Solana dependencies from 3.0.0 to 3.1.4
- Upgrade solana-hash to 4.0.1
- Update spl-token and spl-token-2022 to latest versions
- Update other dependencies (yellowstone-grpc, rustls, wide, etc.)
- Fix wide library API changes: replace cmp_eq() with simd_eq()
Add support for parsing SetComputeUnitLimit and SetComputeUnitPrice instructions from Solana's Compute Budget Program. Update event parser to handle compute budget instructions and bump version to 1.1.3.
- Replace instance-based EventParser with static method design
- Introduce ParserCache module for protocol config caching
- Simplify EventProcessor to pure functional handlers
- Optimize metrics: remove min/max tracking, keep last + avg only
- Reduce atomic operations in hot path for better performance
- Convert UnifiedEvent from trait object (Box<dyn UnifiedEvent>) to concrete enum type
- Remove match_event! macro in favor of native match expressions
- Simplify event metadata access: event.event_type() -> event.metadata().event_type
- Unify event callback signatures: Fn(Box<dyn UnifiedEvent>) -> Fn(UnifiedEvent)
- Update all example code to use the new enum-based event system
- Optimize type system to reduce runtime overhead and improve type safety
Affected scope:
- Core event parser and processor
- All protocol event definitions (PumpFun, PumpSwap, Bonk, Raydium series, etc.)
- gRPC and Shred streaming modules
- All example code
modernize dependencies
- Upgrade all Solana SDK dependencies
from v2.3.x to v3.0.0
- Update yellowstone-grpc dependencies
from v8.0.0 to v9.0.0
- Upgrade tonic from v0.12.3 to
v0.14.2 with transport features
- Update prost and prost-types to
v0.14.1
- Add solana-commitment-config and
tonic-prost dependencies
- Migrate from solana-sdk::instruction
to message::compiled_instruction
- Update imports for SPL token pack
compatibility
- Fix type compatibility issues with
new gRPC and protobuf versions
- Regenerate proto files with updated
codegen and server implementations
- Introduce EventSource enum (Grpc, Shred) for better event source management
- Refactor start_block_processing_thread to conditionally spawn threads based on source type
- Update callers to specify event source type
Replace slot-based storage with signature-based storage in GlobalState
for improved transaction-level precision and developer address tracking.
- Update GlobalState structure and APIs
- Modify event processors to use transaction signatures
- Maintain lock-free performance characteristics
- Support multiple transaction/account filters as vectors
- Add Token2022 extended state parsing
- Add pumpswap pool monitoring example
- Enhance AccountFilter with memcmp filters
BREAKING CHANGE: API signature changes for subscription methods
- Rename CommonAccountEvent to TokenAccountEvent for better semantic clarity
- Rename AccountNonce to NonceAccount for consistent naming convention
- Add MintInfoEvent type to support SPL Token Mint account parsing
- Enhance parse_token_account_event to automatically detect and parse Mint accounts
- Update all example code to use new event types and structures
- Improve event type semantics for better developer experience
- feat(examples): add nonce_listen_example for nonce account tracking
- feat(examples): add token_balance_listen_example for balance monitoring
- feat(parser): implement NonceAccountEvent with nonce state parsing
- feat(types): add AccountNonce event type to filtering system
- docs: update README with new monitoring examples
- chore: bump version to 0.4.2
- Split main.rs into focused grpc_example.rs and shred_example.rs
- Add example overview table and dynamic subscription docs
- Improve documentation structure and user experience