rename protocol to dex_type

This commit is contained in:
wood
2025-07-10 22:15:53 +08:00
parent 7b1951cf29
commit 42952dfc8b
5 changed files with 68 additions and 72 deletions
+6 -6
View File
@@ -255,6 +255,7 @@ async fn test_pumpfun() -> AnyResult<()> {
// buy
solana_trade_client
.buy(
DexType::PumpFun,
mint_pubkey,
Some(creator),
buy_sol_cost,
@@ -262,7 +263,6 @@ async fn test_pumpfun() -> AnyResult<()> {
recent_blockhash,
None,
false,
TradingProtocol::PumpFun,
Some(Box::new(PumpFunParams {
bonding_curve: Some(Arc::new(bonding_curve.clone())),
})),
@@ -274,6 +274,7 @@ async fn test_pumpfun() -> AnyResult<()> {
let amount_token = 0; // Enter the actual amount_token
solana_trade_client
.sell(
DexType::PumpFun,
mint_pubkey,
Some(creator),
amount_token,
@@ -281,7 +282,6 @@ async fn test_pumpfun() -> AnyResult<()> {
recent_blockhash,
None,
false,
TradingProtocol::PumpFun,
None,
)
.await?;
@@ -306,6 +306,7 @@ async fn test_pumpswap() -> AnyResult<()> {
// buy
solana_trade_client
.buy(
DexType::PumpSwap,
mint_pubkey,
Some(creator),
buy_sol_cost,
@@ -313,7 +314,6 @@ async fn test_pumpswap() -> AnyResult<()> {
recent_blockhash,
None,
false,
TradingProtocol::PumpSwap,
None,
)
.await?;
@@ -323,6 +323,7 @@ async fn test_pumpswap() -> AnyResult<()> {
let amount_token = 0; // Enter the actual amount_token
solana_trade_client
.sell(
DexType::PumpSwap,
mint_pubkey,
Some(creator),
amount_token,
@@ -330,7 +331,6 @@ async fn test_pumpswap() -> AnyResult<()> {
recent_blockhash,
None,
false,
TradingProtocol::PumpSwap,
None,
)
.await?;
@@ -354,6 +354,7 @@ async fn test_bonk() -> Result<(), Box<dyn std::error::Error>> {
// buy
solana_trade_client
.buy(
DexType::Bonk,
mint_pubkey,
None,
buy_sol_cost,
@@ -361,7 +362,6 @@ async fn test_bonk() -> Result<(), Box<dyn std::error::Error>> {
recent_blockhash,
None,
false,
TradingProtocol::Bonk,
None,
)
.await?;
@@ -371,6 +371,7 @@ async fn test_bonk() -> Result<(), Box<dyn std::error::Error>> {
let amount_token = 0; // Enter the actual amount_token
solana_trade_client
.sell(
DexType::Bonk,
mint_pubkey,
None,
amount_token,
@@ -378,7 +379,6 @@ async fn test_bonk() -> Result<(), Box<dyn std::error::Error>> {
recent_blockhash,
None,
false,
TradingProtocol::Bonk,
None,
)
.await?;