The buy and sell methods support passing lookup_table_pubkey

This commit is contained in:
wei
2025-08-14 22:29:21 +08:00
parent 5d96fc2a08
commit 22c1d4ea85
4 changed files with 89 additions and 2 deletions
+14
View File
@@ -98,6 +98,7 @@ async fn test_pumpfun_copy_trade_with_grpc(trade_info: PumpFunTradeEvent) -> Any
Some(Box::new(PumpFunParams {
bonding_curve: Some(Arc::new(bonding_curve.clone())),
})),
None,
).await?;
// Sell tokens
@@ -113,6 +114,7 @@ async fn test_pumpfun_copy_trade_with_grpc(trade_info: PumpFunTradeEvent) -> Any
None,
false,
None,
None,
).await?;
Ok(())
@@ -152,6 +154,7 @@ async fn test_pumpfun_sniper_trade_with_shreds(trade_info: PumpFunTradeEvent) ->
Some(Box::new(PumpFunParams {
bonding_curve: Some(Arc::new(bonding_curve.clone())),
})),
None,
).await?;
// Sell tokens
@@ -167,6 +170,7 @@ async fn test_pumpfun_sniper_trade_with_shreds(trade_info: PumpFunTradeEvent) ->
None,
false,
None,
None,
).await?;
Ok(())
@@ -205,6 +209,7 @@ async fn test_pumpswap() -> AnyResult<()> {
pool_quote_token_reserves: Some(pool_quote_token_reserves),
auto_handle_wsol: true,
})),
None,
).await?;
// Sell tokens
@@ -227,6 +232,7 @@ async fn test_pumpswap() -> AnyResult<()> {
pool_quote_token_reserves: Some(pool_quote_token_reserves),
auto_handle_wsol: true,
})),
None,
).await?;
Ok(())
@@ -254,6 +260,7 @@ async fn test_bonk_copy_trade_with_grpc(trade_info: BonkTradeEvent) -> AnyResult
recent_blockhash,
None,
Some(Box::new(BonkParams::from_trade(trade_info))),
None,
).await?;
// Sell tokens
@@ -269,6 +276,7 @@ async fn test_bonk_copy_trade_with_grpc(trade_info: BonkTradeEvent) -> AnyResult
None,
false,
None,
None,
).await?;
Ok(())
@@ -298,6 +306,7 @@ async fn test_bonk_sniper_trade_with_shreds(trade_info: BonkTradeEvent) -> AnyRe
recent_blockhash,
None,
Some(Box::new(BonkParams::from_dev_trade(trade_info))),
None,
).await?;
// Sell tokens
@@ -313,6 +322,7 @@ async fn test_bonk_sniper_trade_with_shreds(trade_info: BonkTradeEvent) -> AnyRe
None,
false,
None,
None,
).await?;
Ok(())
@@ -339,6 +349,7 @@ async fn test_bonk() -> Result<(), Box<dyn std::error::Error>> {
recent_blockhash,
None,
None,
None,
).await?;
// Sell tokens
@@ -354,6 +365,7 @@ async fn test_bonk() -> Result<(), Box<dyn std::error::Error>> {
None,
false,
None,
None,
).await?;
Ok(())
@@ -387,6 +399,7 @@ async fn test_raydium_cpmm() -> Result<(), Box<dyn std::error::Error>> {
minimum_amount_out: Some(buy_amount_out), // 如果不传、默认为0
auto_handle_wsol: true,
})),
None,
).await?;
// Sell tokens
@@ -409,6 +422,7 @@ async fn test_raydium_cpmm() -> Result<(), Box<dyn std::error::Error>> {
minimum_amount_out: Some(sell_sol_amount), // 如果不传、默认为0
auto_handle_wsol: true,
})),
None,
).await?;
Ok(())