Commit Graph

346 Commits

Author SHA1 Message Date
wood 0ac710ce75 fix build warn 2025-09-21 02:56:02 +08:00
wood b46582a273 rebuild nonce and swqos strategy 2025-09-20 14:00:45 +08:00
ysq 4df22f2057 feat: upgrade to v1.0.2 2025-09-20 00:52:37 +08:00
ysq afc34f57fc Merge commit 'd1c001df368e2ecf517e3ff7b8a8f5c46d7b8ad7' 2025-09-20 00:27:28 +08:00
ysq d1c001df36 refactor: move set_global_gas_fee_strategy to GasFeeStrategy struct 2025-09-19 23:59:52 +08:00
ysq e4a6b49aab refactor(gas-fee): replace init_builtin_fee_strategies with set_global_strategy
- Add customizable cu_limit, cu_price, buy_tip, sell_tip parameters
- Update all examples and documentation
- Simplify strategy configuration API
2025-09-19 23:31:41 +08:00
ysq 4907aafead feat: add flexible nonce parameter support
- Add nonce_account and current_nonce to trade parameters
- Remove hardcoded NonceCache dependency from nonce_manager
- Update examples and documentation for new nonce usage
- Fix nonce documentation errors and improve clarity
2025-09-19 18:02:11 +08:00
ysq a53038855e feat: add gas fee strategy system with examples
- Add GasFeeStrategy module supporting normal and high-low fee strategies
- Initialize gas fee strategies in all examples
- Update documentation and README with gas fee strategy configuration
- Improve nonce cache documentation emphasizing latest nonce usage
- Adjust default gas fee configuration parameters
- Remove duplicate imports and unused constant references
2025-09-19 15:46:51 +08:00
ysq e8abb65e2e refactor: simplify GasFeeStrategy from singleton to static methods
- Replace OnceLock singleton pattern with LazyLock static storage
- Convert instance methods to static methods for better performance
- Remove enabled/disabled strategy type management complexity
- Update parallel execution to use new static API
2025-09-19 11:35:13 +08:00
ysq 006686e8a3 feat: major gas fee strategy and documentation overhaul
- feat(gas): add comprehensive gas fee strategy management system
  * Implement GasFeeStrategyType with Default/LowTipHighCuPrice/HighTipLowCuPrice strategies
  * Add dynamic gas fee configuration per SWQOS service and trade type
  * Integrate arc-swap for thread-safe strategy updates

- docs: restructure documentation with dedicated guides
  * Add ADDRESS_LOOKUP_TABLE.md/CN.md for lookup table configuration
  * Add NONCE_CACHE.md/CN.md for nonce management documentation
  * Add TRADING_PARAMETERS.md/CN.md for comprehensive parameter guides
  * Simplify main README.md with focused overview

- refactor: update all examples with new gas fee strategy integration
  * Modernize 14 trading examples with consistent parameter handling
  * Improve error handling and configuration management
  * Enhance parallel trading implementation
2025-09-19 00:49:45 +08:00
ysq fad343ffbf Rollback 2025-09-17 11:14:15 +08:00
ysq da28f40889 feat: v1.0.1 - add custom compute unit limit support
Add custom_cu_limit parameter to parallel trading functions, allowing users to override default compute unit limits for both buy and sell operations.
2025-09-17 00:26:51 +08:00
ysq c5ff7c1cbb refactor: Refactor SDK core architecture and trading parameter system
- Refactor SolanaTrade main class structure with improved modular design
- Refactor trading parameter system: BuyParams/SellParams -> InternalBuyParams/InternalSellParams
- Remove deprecated PriorityFee and related utility functions
- Add SwqosSettings to replace legacy SwqosConfig
- Add comprehensive technical documentation:
  • Address Lookup Table usage guide (EN/CN)
  • Nonce Cache mechanism documentation (EN/CN)
  • Trading Parameters documentation (EN/CN)
- Refactor all example code to adapt to new API interfaces
- Optimize public API design and code comments
- Clean up redundant utility functions and type definitions

Impact: 43 files changed, 2013 insertions(+), 1735 deletions(-)
2025-09-17 00:10:33 +08:00
ysq 943c2627f3 feat: upgrade to v0.6.15 2025-09-15 22:47:07 +08:00
ysq 558188bb38 feat: Add CLI trading tool with multi-DEX support 2025-09-15 21:12:42 +08:00
ysq 8aecc039b1 feat: upgrade to v0.6.13 2025-09-15 00:02:21 +08:00
ysq 1192730e22 feat: upgrade to v0.6.12 2025-09-14 23:28:45 +08:00
ysq 206baca025 feat: bump to v0.6.11 with dependency updates
- Update solana-streamer-sdk to 0.4.9
- Increase transaction confirmation timeout to 10s
- Update documentation version references
2025-09-14 01:21:28 +08:00
sgxiang e52841dc73 Update README.md 2025-09-13 21:09:18 +08:00
ysq f273cf2c82 feat: upgrade to v0.6.10 2025-09-13 17:12:03 +08:00
ysq a1895b1ac2 feat: upgrade to v0.6.9 2025-09-13 00:15:18 +08:00
ysq bbad566c3b fixed 2025-09-12 10:13:21 +08:00
wood 008694daf8 fix swqos tips index errors 2025-09-12 04:29:47 +08:00
ysq 40b4541036 feat: deprecate legacy utility functions and bump version to 0.6.7
- Add deprecation warnings to PumpFun and PumpSwap utility functions
- Update version from 0.6.6 to 0.6.7 in Cargo.toml and documentation
- Add .claude/ directory to .gitignore
- Mark legacy price calculation and data retrieval functions as deprecated
2025-09-11 17:17:58 +08:00
ysq fce043f087 feat: upgrade to v0.6.6 with improved tip transfer logic 2025-09-11 13:42:23 +08:00
ysq b7275b7e18 fixed 2025-09-10 23:37:04 +08:00
ysq dec35a12c4 fixed 2025-09-10 23:25:24 +08:00
ysq 108f635113 feat: upgrade to v0.6.5 2025-09-10 23:23:35 +08:00
ysq b4aa18b0cd docs: Update Readme 2025-09-10 17:35:44 +08:00
ysq fbed00e38b docs: Update Readme 2025-09-10 17:02:54 +08:00
ysq 688f14ebc1 feat: upgrade to v0.6.4 2025-09-10 11:56:16 +08:00
ysq 2226f53f52 feat: upgrade to v0.6.3 2025-09-10 10:52:47 +08:00
ysq 0cb4e08794 docs: Add emoji icons to parameter section headers 2025-09-10 00:37:00 +08:00
ysq d65122c1be Merge commit '30c41efece8223ec65b55e7328f5133dab2627c0' 2025-09-10 00:18:58 +08:00
ysq 30c41efece feat: add seed optimization and mint ATA creation control
- Add open_seed_optimize parameter for transaction CU optimization using createAccountWithSeed
- Add create_mint_ata parameter to control automatic mint token account creation
- Update all examples to include new create_mint_ata parameter (set to true)
- Enhance documentation with detailed explanations of seed optimization features
- Add warnings about compatibility requirements when using seed optimization
- Support conditional mint ATA creation across all trading protocols (PumpFun, PumpSwap, Bonk, Raydium)

BREAKING CHANGE: All buy functions now require create_mint_ata parameter
2025-09-10 00:18:31 +08:00
ysq 5225cff73c feat: add seed optimization and refactor wSOL account control
- Add `open_seed_optimize` parameter for enhanced performance
- Move wSOL account flags from protocol params to buy/sell params
- Add seed_trading example demonstrating optimization features
- Update all examples and upgrade dependencies
- Improve wSOL account management flexibility

BREAKING CHANGE: Modified buy/sell method signatures and protocol param structs
2025-09-10 00:05:13 +08:00
ysq 1f44de8f9a feat: integrate seed optimization and refactor CPMM config
- Upgrade solana-streamer-sdk to 0.4.2
- Add seed optimization support for Raydium instructions
- Refactor CPMM params with dynamic AMM config
- Remove hardcoded AMM_CONFIG constant
2025-09-09 21:42:25 +08:00
ysq 7d7ee3cfbf refactor: split auto_handle_wsol into create/close_wsol_ata params
- Replace auto_handle_wsol with create_wsol_ata and close_wsol_ata
- Enable fine-grained control over wSOL account lifecycle
- Update all trading protocols and documentation
- Add open_seed_optimize support in fast functions

This provides better flexibility for batch operations and advanced trading.
2025-09-09 17:35:09 +08:00
ysq 1c5cfd4511 Merge commit 'cab5ee8ed4a80adbfd51e5c02411ef93ac9f37b4' into feat/seed 2025-09-09 17:09:35 +08:00
ysq 48a6c6283a refactor: optimize trading execution architecture and add wSOL management
- Simplify TradeExecutor interface by integrating middleware and swqos clients into params
- Refactor parallel execution module with dedicated buy/sell execute functions
- Add SOL wrapping/unwrapping functionality for wSOL management
- Remove redundant parameter passing in sell operations
- Delete example main.rs file
- Optimize transaction building with integrated parameter structures

BREAKING CHANGE: TradeExecutor interface simplified, middleware and swqos_clients now passed through params
2025-09-09 17:02:24 +08:00
sgxiang cab5ee8ed4 Merge pull request #31 from 321llljjjfff123/main
feat: 为 buy 和 sell 方法添加 Signature 返回值
2025-09-09 16:03:12 +08:00
liam 5092561091 feat: 为 buy 和 sell 方法添加 Signature 返回值 2025-09-09 12:03:42 +08:00
ysq b9fa2f2f0f refactor: optimize instruction builders structure and improve code documentation
- Add structured comment sections with clear code organization
- Improve variable naming and account address calculation logic
- Update comments for better readability across all trading protocols
- Enhance code structure for PumpFun, PumpSwap, and Raydium protocols
2025-09-09 00:50:24 +08:00
ysq ccf6330260 feat(raydium): optimize instruction builder with arrays and fast functions
- Use fixed arrays instead of Vec for better performance
- Extract wSOL handling to common functions
- Apply fast variants of token account operations
- Pre-allocate capacities and optimize data construction
2025-09-08 23:24:15 +08:00
ysq 76a47e87b1 feat(raydium-cpmm): optimize instruction builder performance and add vault address caching
- Replace dynamic PDA calculations with cached vault addresses for better performance
- Add support for pre-calculated pool state and observation state addresses
- Optimize instruction data creation using fixed-size arrays instead of Vec
- Refactor vault account resolution with fallback to PDA calculation
- Use fast ATA address calculation to reduce computation overhead
- Extract common wSOL handling logic to reduce code duplication
- Add RaydiumCpmmParams::from_trade() constructor for event-driven trading
- Improve memory allocation efficiency with Vec::with_capacity()
2025-09-08 22:33:05 +08:00
ysq c8241d12d2 feat: optimize PumpSwap instruction builder performance and caching
- Add PumpSwapUserVolume PDA cache key support
- Refactor PumpSwap instruction builder to simplify code logic
- Optimize memory allocation with pre-allocated Vec capacity
- Integrate fast_fn caching mechanism to replace redundant PDA calculations
- Standardize account metadata construction and data serialization
- Simplify wSOL handling logic by reusing common functions
- Optimize import statements and remove unused dependencies
- Add pool token account parameters to PumpSwapParams structure
2025-09-08 21:54:05 +08:00
ysq ea6c3e9989 feat: optimize Bonk protocol with caching and wSOL management
- Add instruction/PDA caching for Bonk operations
- Implement reusable wSOL management module
- Support pre-computed pool addresses in BonkParams
- Optimize memory allocation with SmallVec and fixed arrays
- Reduce code duplication across protocols
2025-09-08 18:29:05 +08:00
ysq 47bc81f025 refactor: enhance associated token account handling with custom token program support
- Rename create_associated_token_account_fast to create_associated_token_account_idempotent_fast
- Upgrade get_associated_token_address_fast to support custom token_program_id parameter
- Update ATA cache mechanism to include token_program_id
- Adopt new ATA functions in Bonk and PumpFun instruction builders
- Improve token program compatibility and cache efficiency
2025-09-08 17:33:53 +08:00
ysq 93c133a9ea feat: Add caching system and performance optimizations
- Add fast_fn module with global caches for PDA, ATA, and instruction operations
- Implement memory-efficient caches using CLRU and parking_lot for thread-safe access
- Optimize compute budget instruction generation with caching
- Replace std::sync::Mutex with parking_lot::Mutex for better performance
- Add dedicated caching for PumpFun PDAs and associated token addresses
- Improve transaction building with batch signature optimization
- Add new dependencies: clru, smallvec, parking_lot for cache infrastructure
- Remove unused utility functions in pumpfun module
- Enhance error messages for tip fee configuration validation
2025-09-08 17:12:29 +08:00
ysq 31b5e2855b perf: optimize constants and memory allocation for trading instruction performance 2025-09-08 10:58:43 +08:00