Previously Soyas returned early on successful send without:
- Any logging
- Polling for transaction confirmation
Now aligned with other SWQOS clients (zeroslot, lightspeed, etc.):
- Proper error handling with reconnect retry
- Always poll for transaction confirmation
- Log confirmation success/failure with elapsed time
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change use_exact_sol_amount from bool to Option<bool>
- Default to true (via unwrap_or) for PumpFun and PumpSwap DEXes
- Option is ignored for other DEXes (Raydium, Bonk, Meteora)
- Update all examples to use None (which defaults to true for applicable DEXes)
- Update README documentation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Pass through the new field from TradeBuyParams to SwapParams so users
can opt-in to using buy_exact_sol_in and buy_exact_quote_in instructions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add BUY_EXACT_SOL_IN_DISCRIMINATOR for PumpFun
- Add BUY_EXACT_QUOTE_IN_DISCRIMINATOR for PumpSwap
- Add use_exact_in_instruction field to SwapParams
- When enabled, uses exact input instructions that spend exactly the
specified SOL/quote amount with slippage applied to output tokens
- Defaults to false for backwards compatibility
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Introduce TradingInfrastructure to allow multiple wallets to share the same
RPC client and SWQOS clients, reducing initialization overhead and memory usage.
Changes:
- Add InfrastructureConfig struct for wallet-independent configuration
- Add TradingInfrastructure struct to hold shared RPC/SWQOS clients
- Refactor TradingClient to use Arc<TradingInfrastructure>
- Add from_infrastructure() for fast client creation from shared infrastructure
- Add from_infrastructure_with_wsol_setup() for async WSOL ATA setup
- Maintain backwards compatibility with existing TradingClient::new() API
Benefits:
- First wallet: Full initialization (~200-500ms)
- Subsequent wallets (same config): Fast creation (~1-2ms)
- Memory: Single set of RPC/SWQOS clients shared across wallets
- Add SWQOS_BLACKLIST constant for disabling specific providers
- Add SwqosConfig::is_blacklisted() method to check blacklist status
- Skip blacklisted providers during client initialization with warning
- Remove NextBlock references from README, README_CN and examples
- NextBlock is blacklisted by default, can be enabled by removing from SWQOS_BLACKLIST
Change the default BloxRoute endpoint from germany.solana.dex.blxrbdn.com
to global.solana.dex.blxrbdn.com for better routing.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When using multiple SWQOS channels with durable nonce, if one channel's
transaction lands on-chain but fails (e.g., ExceededSlippage), the nonce
is consumed and other channels cannot succeed.
Previously, the SDK would wait for all channels to timeout (~15s) before
returning, and would often return a generic "timeout" error instead of
the actual on-chain error.
This fix:
- Adds `landed_on_chain` field to TaskResult to track if tx landed
- Adds `is_landed_error()` to detect on-chain failures vs timeouts
- Adds `landed_failed_flag` to ResultCollector for early exit signaling
- Returns immediately with the actual error when a tx lands but fails
This makes behavior consistent with the success case - both return
immediately once the nonce is consumed.
Benefits:
1. Get the actual error (e.g., ExceededSlippage) instead of timeout
2. Return in ~1s instead of ~15s
3. Enable faster retry logic for callers
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixed a critical bug in find_by_base_mint and find_by_quote_mint functions
where pool data decoding failed because the 8-byte discriminator was not
being skipped. This caused all PumpSwapParams::from_mint_by_rpc calls to
fail with "No valid pool decoded" error.
Changes:
- Modified find_by_base_mint to skip discriminator: pool_decode(&acc.data[8..])
- Modified find_by_quote_mint to skip discriminator: pool_decode(&acc.data[8..])
- Added data length check to prevent out-of-bounds access
- Aligned with fetch_pool function which correctly uses &account.data[8..]
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Fixed incorrect get() index from total_size + 1 to proper instruction index
- Use enumerate() to get correct instruction index for prefetch optimization
- Prevents array bounds errors and ensures correct next instruction prefetch
Bug: Using total_size (byte count) as array index for instruction lookup
Solution: Use enumerate() iterator index for proper instruction access
- Introduce DexParamEnum to replace Dex enum for protocol parameters
- Simplify TradeConfig::new() to accept only 3 essential parameters
- Update all examples to use new DexParamEnum API
- Optimize executor and params modules
- Remove deprecated wsol_use_seed and mint_use_seed parameters
- Fix fast_fn module exports
Improve error message extraction in poll_transaction_confirmation to:
- Collect multiple error messages instead of stopping at the first one
- Add support for "Program log: Error: " format in addition to "Error Message: "
- Concatenate multiple errors with semicolon separator for comprehensive error reporting
- Add TradeError struct with code, message, and instruction fields
- Enhance poll_transaction_confirmation to extract detailed error info from logs
- Change buy/sell return type from Option<anyhow::Error> to Option<TradeError>
- Add solana-transaction-status-client-types dependency
- Remove unused parallel.rs module
- Define minimum tip constants for each SWQOS provider (JITO, NextBlock, Node1, etc.)
- Add dynamic filtering in execute_parallel to skip transaction building when tip is below provider's minimum
- Add missing SWQOS_ENDPOINTS_ASTRALANE constant
- Ensure SWQOS clients are always initialized but transactions are conditionally built based on current tip amount
- Add update_buy_tip() method to dynamically update buy tip while keeping other parameters unchanged
- Add update_sell_tip() method to dynamically update sell tip while keeping other parameters unchanged
- Enable simple one-line tip updates for all configured SWQOS providers
- Support percentage-based dynamic tip calculation in trading bots
- Split use_seed_optimize parameter into two independent configs:
* wsol_use_seed: controls seed optimization for WSOL ATA operations (default: false)
* mint_use_seed: controls seed optimization for other mint ATA operations (default: true)
- Refactor TradeConfig to accept all parameters in new() constructor
- Remove deprecated builder methods (with_seed_config, with_wsol_ata_config)
- Add wsol_use_seed and mint_use_seed fields to SwapParams
- Remove open_seed_optimize field from SwapParams
- Update all instruction builders to use correct seed parameter:
* Use params.wsol_use_seed for WSOL token operations
* Use params.mint_use_seed for other token operations
* Fix token type detection in bonk.rs, raydium_cpmm.rs, and raydium_amm_v4.rs
to properly select wsol_use_seed when dealing with WSOL tokens
- Update wsol_manager functions to accept is_use_seed parameter:
* handle_wsol()
* close_wsol()
* create_wsol_ata()
* wrap_sol_only()
* wrap_wsol_to_sol()
- Add wrap_wsol_to_sol() function with smart temporary account selection:
* If source is seed-created, use normal ATA for temp account
* If source is normal ATA, use seed ATA for temp account
* Prevents address conflicts while optimizing performance
This provides fine-grained control over seed optimization strategies,
allowing different configurations for WSOL and other tokens.
Major changes:
- Bump version from 3.3.1 to 3.3.2
- Add token_program field to PumpFun trading parameters
- Support explicit token_program passing for better TOKEN_PROGRAM_2022 compatibility
- Update all example code to pass token_program parameter
- Optimize token program determination logic from auto-inference to explicit parameter
Major changes:
- Bump version from 3.3.0 to 3.3.1
- Update GasFeeStrategy API with min/max data size parameters
- Enhance trade return values with Optional<anyhow::Error> in buy/sell/sell_percent methods
- Fix PumpFun Mayhem mode fee recipient constant bug
- Standardize gas fee strategy parameters across all examples
- Update all examples to handle new triple return value (bool, Signature, Option<Error>)