Commit Graph

422 Commits

Author SHA1 Message Date
ysq 353c814697 feat(swqos): add Stellium support and update minimum tip requirements 2025-12-01 00:13:34 +08:00
ysq 25fa295994 feat(swqos): enhance error message collection from transaction logs
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
2025-11-27 22:13:35 +08:00
ysq 0e491a8b80 Merge commit 'd0ae515af1c57db680794d65456d997844180a58' 2025-11-25 22:19:22 +08:00
ysq 6e5362fdd0 chore: bump version to 3.3.5 and update examples with optimized token address functions 2025-11-25 22:18:57 +08:00
sgxiang d0ae515af1 Merge pull request #51 from yangdc930811/main
feat:优化判断买卖方向;直接用SwapParams里的参数
2025-11-25 21:52:38 +08:00
yangdongcheng 9b9cb7e73a Merge branch '0xfnzero:main' into main 2025-11-25 09:28:28 +08:00
ysq 277c99a937 Merge commit '5358d9ea281fafde7fd526b62d9cc57dad0e0abd' 2025-11-24 22:59:47 +08:00
ysq c3630e4c99 feat: upgrade to v3.3.4 with improved error handling and transaction details
- 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
2025-11-24 22:52:56 +08:00
Wood 5358d9ea28 feat(swqos): add minimum tip constants and conditional transaction building
- 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
2025-11-24 06:03:31 +08:00
Wood 3132981f85 feat: add dynamic tip update methods to GasFeeStrategy
- 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
2025-11-23 21:02:55 +08:00
Wood 26cee93fb1 feat: optimize WSOL wrap/unwrap with seed account reuse check
- Add account existence check before creating seed account
- Implement wrap_wsol_to_sol_without_create for reusing existing seed accounts
- Prevent transaction failures when temporary seed account already exists
- Improve WSOL conversion efficiency by avoiding redundant account creation
2025-11-23 20:18:01 +08:00
Wood ce83b5ae68 Revert "refactor: split seed optimization config into wsol_use_seed and mint_use_seed"
This reverts commit eb8de36f50.
2025-11-22 01:41:06 +08:00
Wood eb8de36f50 refactor: split seed optimization config into wsol_use_seed and mint_use_seed
- 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.
2025-11-21 13:05:39 +08:00
home 042f7dcaad feat:优化判断买卖方向;直接用SwapParams里的参数 2025-11-20 21:21:28 +08:00
ysq c0e026a88a feat: add wrap_wsol_to_sol function with seed account optimization 2025-11-20 11:21:27 +08:00
ysq f06d6b4eee Merge commit '7fb4fd35d18bb0ec9c87d893958d4ac0c506b39e' 2025-11-18 10:08:37 +08:00
ysq b04ca6c27a feat: upgrade to v3.3.2 with explicit token_program parameter support
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
2025-11-18 10:04:46 +08:00
Wood 7fb4fd35d1 feat: add Node1 minimum tip amount validation (0.002 SOL)
- Add intelligent tip amount detection for Node1
- Implement MIN_TIP_AMOUNT check in transaction builder
- Add MIN_TIP_AMOUNT.md documentation
- Optimize pumpswap instruction handling
- Update common utility functions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 23:34:28 +08:00
ysq 8f945995a4 Merge commit 'bee7f5b78c3ee060472dbf9874d46d2f4b8a03c1' 2025-11-16 23:47:17 +08:00
ysq bee7f5b78c feat: upgrade to v3.3.1 with enhanced error handling
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>)
2025-11-16 23:46:58 +08:00
ysq 5c99a31179 feat: add TOKEN_PROGRAM_2022 support 2025-11-14 00:04:44 +08:00
Wood 71964eeced Merge branch 'main' of github.com:0xfnzero/sol-trade-sdk 2025-11-12 22:00:53 +08:00
Wood 0f87db6e8c update fee strategy 2025-11-12 22:00:13 +08:00
ysq 2ce7808135 feat: update GasFeeStrategy API calls with data size parameters 2025-11-10 16:44:18 +08:00
ysq bfb2a3e35a Merge commit '1be1674bf3d1ca4e1e77a7879f2991aeae53b009' 2025-11-10 16:38:29 +08:00
ysq 4cee5e6a06 feat: add support for pump mayhem mode 2025-11-10 15:30:24 +08:00
Wood 1be1674bf3 update gas fee strategy support data size limit settings 2025-11-09 21:20:55 +08:00
ysq 4f315187f3 feat: upgrade to v3.2.1 2025-11-07 17:04:36 +08:00
ysq c5a55b1c14 feat: refactor seed optimization to global configuration in v3.2.0
- Remove open_seed_optimize parameter from TradeBuyParams and TradeSellParams structs
- Add global use_seed_optimize configuration in TradeConfig with default value true
- Add create_wsol_ata_on_startup configuration in TradeConfig with default value true
- Implement automatic WSOL ATA creation and verification on SDK initialization
- Add with_wsol_ata_config() builder method to TradeConfig for custom WSOL settings
- Update all examples to remove open_seed_optimize parameter usage
- Update documentation (README, TRADING_PARAMETERS) to reflect new configuration approach
- Upgrade package version from 3.1.7 to 3.2.0

Breaking Changes:
- open_seed_optimize parameter removed from trade parameters (now global setting)
- Seed optimization is now enabled by default for all operations
2025-11-07 16:57:28 +08:00
ysq 9824576164 feat: upgrade to v3.1.6 2025-11-06 10:02:17 +08:00
ysq 428e272623 feat: upgrade to v3.1.6 2025-11-04 23:58:11 +08:00
ysq ea3d36aa87 feat: upgrade to v3.1.5 2025-10-30 22:29:52 +08:00
ysq 06e36584f7 chore: update LP fee basis points from 20 to 25 2025-10-30 22:29:06 +08:00
ysq d5834e056f feat: add transaction simulation support and close_mint_token_ata parameter
- Add `simulate` parameter to TradeBuyParams and TradeSellParams for transaction simulation
- Add `close_mint_token_ata` parameter to TradeSellParams for closing mint token ATA
- Implement simulate_transaction function to validate transactions without blockchain submission
- Update all examples to include new parameters (simulate: false, close_mint_token_ata: false)
- Add comprehensive documentation for transaction simulation feature
- Show detailed simulation output including logs, compute units, and errors
- Print timing metrics in English for better international compatibility
2025-10-30 22:11:55 +08:00
ysq 11383a0492 feat: add close_mint_token_ata support for sell transactions 2025-10-26 23:55:28 +08:00
Wood 2bf43fc99f upgrade solana-client version 2025-10-25 22:46:36 +08:00
ysq d843f978af feat: upgrade to v3.1.3 2025-10-23 00:32:21 +08:00
ysq c6e2254729 feat: upgrade to v3.1.2 2025-10-16 22:20:06 +08:00
Wood 9aaf52b22f Merge branch 'main' of github.com:0xfnzero/sol-trade-sdk 2025-10-14 17:33:41 +08:00
Wood 2eea6d25e1 fix build errors for syscall_bypass.rs 2025-10-14 17:33:13 +08:00
ysq 86d64811ad feat: require durable_nonce for multiple swqos transactions 2025-10-12 20:30:33 +08:00
ysq aa1ebc48c4 Merge commit 'ce1dc2b185679fbdfe8c46835ce1346e0c00904f' 2025-10-12 20:25:07 +08:00
sgxiang ce1dc2b185 Merge pull request #44 from tommggo/feat/support-usdc-quote
feat: Add USDC quote support for swap protocols (fixes #38)
2025-10-12 17:23:00 +08:00
tommggo c3852ccb7a Merge branch 'main' into feat/support-usdc-quote
# Conflicts:
#	examples/pumpswap_trading/src/main.rs
#	examples/raydium_cpmm_trading/src/main.rs
#	src/trading/core/executor.rs
2025-10-12 15:39:43 +08:00
tommggo 163882c7f3 feat: add USDC quote support for swap protocols 2025-10-12 12:01:21 +08:00
0xfnzero 28cfef62db Update README_CN.md 2025-10-08 22:58:03 +08:00
0xfnzero 1ceabda9db Update README.md 2025-10-08 22:57:38 +08:00
tommggo d567477bdb Revert "feat: swap support usdc quote"
This reverts commit 9bb08bd567.
2025-10-08 21:04:50 +08:00
tommggo 9bb08bd567 feat: swap support usdc quote 2025-10-08 20:08:19 +08:00
ysq cf030cec49 feat: upgrade to v3.1.0 2025-10-07 23:48:09 +08:00