feat: Helius Sender SWQOS support and global check_min_tip option
- Add Helius Sender client (helius.rs) with dual routing and swqos_only mode - Helius min tip: 0.0002 SOL default, 0.000005 SOL when swqos_only=true - Add TradeConfig.check_min_tip (default false) to skip min-tip validation for lower latency - Thread check_min_tip through SwapParams and execute_parallel; only call min_tip_sol when enabled - Add SWQOS_ENDPOINTS_HELIUS and HELIUS_TIP_ACCOUNTS in constants - Extend SwqosConfig/SwqosType for Helius; add Helius to get_endpoint and get_swqos_client - Update trading_client, shared_infrastructure and middleware_system examples Made-with: Cursor
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
use anyhow::Result;
|
||||
use sol_trade_sdk::{
|
||||
common::{AnyResult, TradeConfig},
|
||||
swqos::{SwqosConfig, SwqosRegion},
|
||||
swqos::SwqosConfig,
|
||||
trading::{
|
||||
core::params::{PumpSwapParams, DexParamEnum}, factory::DexType, middleware::builtin::LoggingMiddleware,
|
||||
core::params::{PumpSwapParams, DexParamEnum}, factory::DexType,
|
||||
InstructionMiddleware, MiddlewareManager,
|
||||
},
|
||||
SolanaTrade, TradeTokenType,
|
||||
@@ -30,8 +30,8 @@ impl InstructionMiddleware for CustomMiddleware {
|
||||
fn process_protocol_instructions(
|
||||
&self,
|
||||
protocol_instructions: Vec<Instruction>,
|
||||
protocol_name: String,
|
||||
is_buy: bool,
|
||||
_protocol_name: String,
|
||||
_is_buy: bool,
|
||||
) -> Result<Vec<Instruction>> {
|
||||
// do anything you want here
|
||||
// you can modify the instructions here
|
||||
@@ -41,8 +41,8 @@ impl InstructionMiddleware for CustomMiddleware {
|
||||
fn process_full_instructions(
|
||||
&self,
|
||||
full_instructions: Vec<Instruction>,
|
||||
protocol_name: String,
|
||||
is_buy: bool,
|
||||
_protocol_name: String,
|
||||
_is_buy: bool,
|
||||
) -> Result<Vec<Instruction>> {
|
||||
// do anything you want here
|
||||
// you can modify the instructions here
|
||||
|
||||
Reference in New Issue
Block a user