refactor: simplify trading API and improve configuration management
- Remove `with_tip` parameter from buy/sell methods, always use tip-enabled transactions - Fix variable naming inconsistencies (token_amount -> amount_token) - Add automatic padding logic for buy_tip_fees array to match swqos_configs length - Update README examples with corrected variable references and API usage - Fix bug in test_pumpswap() using wrong DexType (PumpFun -> PumpSwap) - Improve API documentation with clearer parameter descriptions - Clean up code formatting and remove unnecessary blank lines Breaking Changes: - buy() and sell() method signatures changed (removed with_tip parameter) - Variable naming standardized across codebase
This commit is contained in:
@@ -256,7 +256,6 @@ async fn test_pumpfun_sniper_trade_width_shreds(trade_info: PumpFunTradeEvent) -
|
||||
slippage_basis_points,
|
||||
recent_blockhash,
|
||||
None,
|
||||
false,
|
||||
Some(Box::new(PumpFunParams {
|
||||
bonding_curve: Some(Arc::new(bonding_curve.clone())),
|
||||
})),
|
||||
@@ -292,7 +291,6 @@ async fn test_pumpfun_copy_trade_width_grpc(trade_info: PumpFunTradeEvent) -> An
|
||||
slippage_basis_points,
|
||||
recent_blockhash,
|
||||
None,
|
||||
false,
|
||||
Some(Box::new(PumpFunParams {
|
||||
bonding_curve: Some(Arc::new(bonding_curve.clone())),
|
||||
})),
|
||||
@@ -313,7 +311,6 @@ async fn test_pumpfun_sell() -> AnyResult<()> {
|
||||
slippage_basis_points,
|
||||
recent_blockhash,
|
||||
None,
|
||||
false,
|
||||
None,
|
||||
)
|
||||
.await?;
|
||||
@@ -344,7 +341,6 @@ async fn test_pumpswap() -> AnyResult<()> {
|
||||
slippage_basis_points,
|
||||
recent_blockhash,
|
||||
None,
|
||||
false,
|
||||
None,
|
||||
)
|
||||
.await?;
|
||||
@@ -361,7 +357,6 @@ async fn test_pumpswap() -> AnyResult<()> {
|
||||
slippage_basis_points,
|
||||
recent_blockhash,
|
||||
None,
|
||||
false,
|
||||
None,
|
||||
)
|
||||
.await?;
|
||||
@@ -393,7 +388,6 @@ async fn test_bonk() -> Result<(), Box<dyn std::error::Error>> {
|
||||
slippage_basis_points,
|
||||
recent_blockhash,
|
||||
None,
|
||||
false,
|
||||
None,
|
||||
)
|
||||
.await?;
|
||||
@@ -409,7 +403,6 @@ async fn test_bonk() -> Result<(), Box<dyn std::error::Error>> {
|
||||
slippage_basis_points,
|
||||
recent_blockhash,
|
||||
None,
|
||||
false,
|
||||
None,
|
||||
)
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user