Commit Graph

309 Commits

Author SHA1 Message Date
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
ysq 0968a93d4f feat: upgrade to v0.6.0 2025-09-08 00:26:58 +08:00
ysq 8d77f6e5ca feat: Add PumpSwap direct trading example and RPC client optimization 2025-09-08 00:24:29 +08:00
ysq 1252446c90 fixed 2025-09-07 23:54:37 +08:00
ysq 544e65318d refactor: optimize AccountMeta creation with lazy static constants
- Consolidate protocol constants to unified module
- Pre-build AccountMeta objects using once_cell::Lazy
- Reduce instruction building overhead across all DEX protocols
- Improve code maintainability and performance
2025-09-07 21:36:57 +08:00
ysq 51253c7aaf refactor: simplify instruction builders and optimize transaction construction
- Remove redundant helper methods in instruction builders (bonk, pumpfun, pumpswap, raydium)
- Inline buy/sell instruction construction for better performance
- Remove unnecessary Buy/Sell structs and helper functions in pumpfun
- Consolidate instruction building logic to reduce code duplication
- Fix pointer dereference issue in parallel execution
- Improve code maintainability and reduce complexity
2025-09-07 19:50:27 +08:00
ysq 21d6714c25 refactor: reorganize code structure and optimize modular design
- Remove src/common/address_lookup.rs and tip_cache.rs to simplify common modules
- Move protocol-specific utility functions from trading/ to instruction/utils/
- Refactor utility functions for PumpFun, PumpSwap, Raydium AMM V4, and Raydium CPMM
- Consolidate constant definitions by inlining seeds and accounts modules into respective utility files
- Update all import paths to ensure code consistency
- Optimize trading parameter construction and executor logic
- Improve address lookup cache and nonce management mechanisms
2025-09-07 19:00:08 +08:00
ysq eddac7a679 perf: optimize trade executor performance and reduce memory usage
- Implement singleton pattern for TradeFactory
- Replace TradeTimer with direct Instant measurements
- Optimize PumpFun instruction building and parallel execution
- Reduce unnecessary clones and improve memory allocation
- Simplify address lookup table management
2025-09-07 18:07:45 +08:00
ysq 7e425fce75 Merge commit 'a64371169ad6c60de38d7c0c0308da8171b17147' 2025-09-07 17:23:25 +08:00
ysq 90fcd5ca01 refactor: unify transaction building and execution architecture
- Remove redundant transaction builder functions and merge into single build_transaction()
- Simplify compute budget manager with unified add_compute_budget_instructions()
- Consolidate trade executor interface by removing separate buy/sell methods
- Unify BuyParams/SellParams usage, remove *WithTipParams structs
- Streamline parallel execution logic and remove TradeType parameter
- Delete obsolete files: address_lookup.rs, tip_cache.rs
- Clean up nonce manager by removing unused is_using_nonce() function

This refactoring reduces code duplication and provides a cleaner, more maintainable API
for transaction building and execution across all trading protocols.
2025-09-07 17:22:58 +08:00
wei a64371169a fix 2025-09-07 15:24:51 +08:00
wei df00d3f26a feat: add Astralane 2025-09-07 15:22:06 +08:00
wei 6e04458659 feat:temporal add keep-alive 2025-09-07 12:24:28 +08:00
wei 743caff2f8 update flashBlock keep-alive 2025-09-07 11:33:40 +08:00
wei b729ec104e update NextBlock 2025-09-06 23:16:55 +08:00
ysq 65ba15abfa fixed 2025-09-06 22:12:25 +08:00
wei 75adf302ed update readme 2025-09-06 21:56:59 +08:00
wei fdb9adfe5b feat:each SWQOS service now supports an optional custom URL parameter: 2025-09-06 21:52:06 +08:00
wei 9f8278f109 feat: add BlockRazor 2025-09-06 21:24:38 +08:00
ysq 597982653d feat: optimize cache systems and add examples 2025-09-04 16:32:34 +08:00
ysq 692b0ce715 Improvement: Add print 2025-09-03 22:38:41 +08:00
ysq 02af3e98e2 feat(pumpswap): Add fee configuration support v0.5.6 2025-09-03 21:06:14 +08:00
ysq db3b50fc28 feat: v0.5.5 - enhanced priority fee system and dependency updates
- Update solana-streamer-sdk to 0.4.1
- Refactor priority fee API (custom_buy_tip_fee → custom_priority_fee)
- Simplify documentation and clean up examples

BREAKING CHANGE: priority fee parameter type changed
2025-09-03 17:47:10 +08:00
wei 6f953ffa0d The buy and sell methods have added the priority_fee parameter, which can control the priority fee for each transaction 2025-09-02 09:43:53 +08:00
0xfnzero 7aa676781c Update README_CN.md 2025-09-02 02:59:22 +08:00
0xfnzero f620209882 Update README.md 2025-09-02 02:58:32 +08:00
0xfnzero b257259e10 Update README_CN.md 2025-09-02 02:56:54 +08:00
0xfnzero 5d34043078 Update README.md 2025-09-02 02:52:46 +08:00
wei 3f9b3cec8c remove invalid fields 2025-09-02 00:43:05 +08:00
ysq f29b38c8bc Merge commit '818f1abd9d2e4c35656f8b3a006811bbd80928e1' 2025-08-31 22:54:36 +08:00
ysq 865ad8148e feat: upgrade to v0.5.3 2025-08-31 22:54:08 +08:00
wei 818f1abd9d fix: BonkParams platform_onfig changed to platform_comfig 2025-08-30 23:51:20 +08:00
ysq 9438172029 feat: upgrade to v0.5.2 2025-08-27 14:27:26 +08:00
ysq c10406915c feat: add examples and enhance MEV protection services
This commit adds comprehensive examples for various trading operations including:
- PumpFun copy and sniper trading
- Bonk copy and sniper trading
- PumpSwap trading
- Raydium CPMM and AMM V4 trading
- Middleware system demonstration
- Event subscription

Enhanced MEV protection services with FlashBlock and Node1 integration.
Updated instruction modules for bonk, pumpswap, and raydium_cpmm.
Improved SWQOS modules for better transaction handling.
2025-08-25 00:21:15 +08:00
ysq 90ea46ea3f feat: This update includes the following changes:
1. Upgrade version from 0.4.7 to 0.5.0
2. Rename compute unit parameters from unit_limit/unit_price to tip_unit_limit/tip_unit_price
3. Remove creator parameter from API to simplify trading interface
4. Optimize PumpFun and PumpSwap protocol parameter structures with creator_vault support
5. Remove unnecessary constants and functions like TOTAL_SUPPLY and BONDING_CURVE_SUPPLY
6. Improve code formatting and documentation
2025-08-23 20:37:03 +08:00
ysq 20767ae597 feat(core): Upgrade SDK version to 0.4.7 and enhance parameter constructors
- Upgrade SDK version from 0.4.6 to 0.4.7
- Enhance PumpFunParams.immediate_sell function with creator parameter support
- Extend BonkParams.immediate_sell function with necessary platform parameters
2025-08-22 22:28:54 +08:00
ysq 1f47fc84d4 Merge commit '2b1c40f55430c781c84299328abfb65166b466fa' 2025-08-22 21:49:50 +08:00
ysq 8d17530843 feat(bonk): Update BONK protocol support and fee handling
- Add system program and associated account support
- Update instruction builder with platform/creator accounts
- Implement associated account helper functions
- Upgrade SDK to 0.4.6 and dependencies
- Repla
2025-08-22 21:49:14 +08:00