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
This commit is contained in:
ysq
2025-09-09 17:02:24 +08:00
parent b9fa2f2f0f
commit 48a6c6283a
34 changed files with 586 additions and 853 deletions
+2 -1
View File
@@ -136,7 +136,6 @@ async fn create_solana_trade_client() -> AnyResult<SolanaTrade> {
commitment: CommitmentConfig::confirmed(),
priority_fee: priority_fee,
swqos_configs,
lookup_table_key: None,
};
let solana_trade_client = SolanaTrade::new(Arc::new(payer), trade_config).await;
@@ -188,6 +187,7 @@ async fn pumpswap_trade_with_grpc(mint_pubkey: Pubkey, params: PumpSwapParams) -
Box::new(params.clone()),
None,
true,
false,
)
.await?;
@@ -216,6 +216,7 @@ async fn pumpswap_trade_with_grpc(mint_pubkey: Pubkey, params: PumpSwapParams) -
Box::new(params.clone()),
None,
true,
false,
)
.await?;