From f772e26aa2c1960d3d13a3a3382709873d502a5b Mon Sep 17 00:00:00 2001 From: wood Date: Mon, 7 Jul 2025 02:06:52 +0800 Subject: [PATCH] add bloxroute --- src/constants/mod.rs | 1 + src/constants/pumpfun/mod.rs | 51 ------------- src/constants/swqos.rs | 125 +++++++++++++++++++++++++++++++ src/swqos/bloxroute.rs | 140 +++++++++++++++++++++++++++++++++++ src/swqos/common.rs | 53 ------------- src/swqos/jito.rs | 2 +- src/swqos/mod.rs | 5 +- src/swqos/nextblock.rs | 2 +- src/swqos/temporal.rs | 2 +- src/swqos/zeroslot.rs | 3 +- 10 files changed, 274 insertions(+), 110 deletions(-) create mode 100644 src/constants/swqos.rs create mode 100644 src/swqos/bloxroute.rs diff --git a/src/constants/mod.rs b/src/constants/mod.rs index 561af57..d174ac3 100755 --- a/src/constants/mod.rs +++ b/src/constants/mod.rs @@ -1,6 +1,7 @@ pub mod pumpfun; pub mod pumpswap; pub mod raydium; +pub mod swqos; pub mod trade_type { pub const COPY_BUY: &'static str = "copy_buy"; diff --git a/src/constants/pumpfun/mod.rs b/src/constants/pumpfun/mod.rs index 38969cf..6baaa30 100755 --- a/src/constants/pumpfun/mod.rs +++ b/src/constants/pumpfun/mod.rs @@ -104,57 +104,6 @@ pub mod accounts { /// Rent Sysvar ID pub const RENT: Pubkey = pubkey!("SysvarRent111111111111111111111111111111111"); - pub const JITO_TIP_ACCOUNTS: [&str; 8] = [ - "96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5", - "HFqU5x63VTqvQss8hp11i4wVV8bD44PvwucfZ2bU7gRe", - "Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY", - "ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49", - "DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh", - "ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt", - "DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL", - "3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT", - ]; - - /// Tip accounts - pub const NEXTBLOCK_TIP_ACCOUNTS: &[&str] = &[ - "NextbLoCkVtMGcV47JzewQdvBpLqT9TxQFozQkN98pE", - "NexTbLoCkWykbLuB1NkjXgFWkX9oAtcoagQegygXXA2", - "NeXTBLoCKs9F1y5PJS9CKrFNNLU1keHW71rfh7KgA1X", - "NexTBLockJYZ7QD7p2byrUa6df8ndV2WSd8GkbWqfbb", - "neXtBLock1LeC67jYd1QdAa32kbVeubsfPNTJC1V5At", - "nEXTBLockYgngeRmRrjDV31mGSekVPqZoMGhQEZtPVG", - "NEXTbLoCkB51HpLBLojQfpyVAMorm3zzKg7w9NFdqid", - "nextBLoCkPMgmG8ZgJtABeScP35qLa2AMCNKntAP7Xc" - ]; - - pub const ZEROSLOT_TIP_ACCOUNTS: &[&str] = &[ - "Eb2KpSC8uMt9GmzyAEm5Eb1AAAgTjRaXWFjKyFXHZxF3", - "FCjUJZ1qozm1e8romw216qyfQMaaWKxWsuySnumVCCNe", - "ENxTEjSQ1YabmUpXAdCgevnHQ9MHdLv8tzFiuiYJqa13", - "6rYLG55Q9RpsPGvqdPNJs4z5WTxJVatMB8zV3WJhs5EK", - "Cix2bHfqPcKcM233mzxbLk14kSggUUiz2A87fJtGivXr", - ]; - - pub const NOZOMI_TIP_ACCOUNTS: &[&str] = &[ - "TEMPaMeCRFAS9EKF53Jd6KpHxgL47uWLcpFArU1Fanq", - "noz3jAjPiHuBPqiSPkkugaJDkJscPuRhYnSpbi8UvC4", - "noz3str9KXfpKknefHji8L1mPgimezaiUyCHYMDv1GE", - "noz6uoYCDijhu1V7cutCpwxNiSovEwLdRHPwmgCGDNo", - "noz9EPNcT7WH6Sou3sr3GGjHQYVkN3DNirpbvDkv9YJ", - "nozc5yT15LazbLTFVZzoNZCwjh3yUtW86LoUyqsBu4L", - "nozFrhfnNGoyqwVuwPAW4aaGqempx4PU6g6D9CJMv7Z", - "nozievPk7HyK1Rqy1MPJwVQ7qQg2QoJGyP71oeDwbsu", - "noznbgwYnBLDHu8wcQVCEw6kDrXkPdKkydGJGNXGvL7", - "nozNVWs5N8mgzuD3qigrCG2UoKxZttxzZ85pvAQVrbP", - "nozpEGbwx4BcGp6pvEdAh1JoC2CQGZdU6HbNP1v2p6P", - "nozrhjhkCr3zXT3BiT4WCodYCUFeQvcdUkM7MqhKqge", - "nozrwQtWhEdrA6W8dkbt9gnUaMs52PdAv5byipnadq3", - "nozUacTVWub3cL4mJmGCYjKZTnE9RbdY5AP46iQgbPJ", - "nozWCyTPppJjRuw2fpzDhhWbW355fzosWSzrrMYB1Qk", - "nozWNju6dY353eMkMqURqwQEoM3SFgEKC6psLCSfUne", - "nozxNBgWohjR75vdspfxR5H9ceC7XXH99xpxhVGt3Bb" - ]; - pub const AMM_PROGRAM: Pubkey = pubkey!("675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8"); } diff --git a/src/constants/swqos.rs b/src/constants/swqos.rs new file mode 100644 index 0000000..608ef26 --- /dev/null +++ b/src/constants/swqos.rs @@ -0,0 +1,125 @@ +use solana_program::pubkey; +use solana_sdk::pubkey::Pubkey; + + +pub const JITO_TIP_ACCOUNTS: &[Pubkey] = &[ + pubkey!("96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5"), + pubkey!("HFqU5x63VTqvQss8hp11i4wVV8bD44PvwucfZ2bU7gRe"), + pubkey!("Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY"), + pubkey!("ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49"), + pubkey!("DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh"), + pubkey!("ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt"), + pubkey!("DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL"), + pubkey!("3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT"), +]; + +pub const NEXTBLOCK_TIP_ACCOUNTS: &[Pubkey] = &[ + pubkey!("NextbLoCkVtMGcV47JzewQdvBpLqT9TxQFozQkN98pE"), + pubkey!("NexTbLoCkWykbLuB1NkjXgFWkX9oAtcoagQegygXXA2"), + pubkey!("NeXTBLoCKs9F1y5PJS9CKrFNNLU1keHW71rfh7KgA1X"), + pubkey!("NexTBLockJYZ7QD7p2byrUa6df8ndV2WSd8GkbWqfbb"), + pubkey!("neXtBLock1LeC67jYd1QdAa32kbVeubsfPNTJC1V5At"), + pubkey!("nEXTBLockYgngeRmRrjDV31mGSekVPqZoMGhQEZtPVG"), + pubkey!("NEXTbLoCkB51HpLBLojQfpyVAMorm3zzKg7w9NFdqid"), + pubkey!("nextBLoCkPMgmG8ZgJtABeScP35qLa2AMCNKntAP7Xc"), +]; + +pub const ZEROSLOT_TIP_ACCOUNTS: &[Pubkey] = &[ + pubkey!("Eb2KpSC8uMt9GmzyAEm5Eb1AAAgTjRaXWFjKyFXHZxF3"), + pubkey!("FCjUJZ1qozm1e8romw216qyfQMaaWKxWsuySnumVCCNe"), + pubkey!("ENxTEjSQ1YabmUpXAdCgevnHQ9MHdLv8tzFiuiYJqa13"), + pubkey!("6rYLG55Q9RpsPGvqdPNJs4z5WTxJVatMB8zV3WJhs5EK"), + pubkey!("Cix2bHfqPcKcM233mzxbLk14kSggUUiz2A87fJtGivXr"), +]; + +pub const NOZOMI_TIP_ACCOUNTS: &[Pubkey] = &[ + pubkey!("TEMPaMeCRFAS9EKF53Jd6KpHxgL47uWLcpFArU1Fanq"), + pubkey!("noz3jAjPiHuBPqiSPkkugaJDkJscPuRhYnSpbi8UvC4"), + pubkey!("noz3str9KXfpKknefHji8L1mPgimezaiUyCHYMDv1GE"), + pubkey!("noz6uoYCDijhu1V7cutCpwxNiSovEwLdRHPwmgCGDNo"), + pubkey!("noz9EPNcT7WH6Sou3sr3GGjHQYVkN3DNirpbvDkv9YJ"), + pubkey!("nozc5yT15LazbLTFVZzoNZCwjh3yUtW86LoUyqsBu4L"), + pubkey!("nozFrhfnNGoyqwVuwPAW4aaGqempx4PU6g6D9CJMv7Z"), + pubkey!("nozievPk7HyK1Rqy1MPJwVQ7qQg2QoJGyP71oeDwbsu"), + pubkey!("noznbgwYnBLDHu8wcQVCEw6kDrXkPdKkydGJGNXGvL7"), + pubkey!("nozNVWs5N8mgzuD3qigrCG2UoKxZttxzZ85pvAQVrbP"), + pubkey!("nozpEGbwx4BcGp6pvEdAh1JoC2CQGZdU6HbNP1v2p6P"), + pubkey!("nozrhjhkCr3zXT3BiT4WCodYCUFeQvcdUkM7MqhKqge"), + pubkey!("nozrwQtWhEdrA6W8dkbt9gnUaMs52PdAv5byipnadq3"), + pubkey!("nozUacTVWub3cL4mJmGCYjKZTnE9RbdY5AP46iQgbPJ"), + pubkey!("nozWCyTPppJjRuw2fpzDhhWbW355fzosWSzrrMYB1Qk"), + pubkey!("nozWNju6dY353eMkMqURqwQEoM3SFgEKC6psLCSfUne"), + pubkey!("nozxNBgWohjR75vdspfxR5H9ceC7XXH99xpxhVGt3Bb"), +]; + +pub const BLOX_TIP_ACCOUNTS: &[Pubkey] = &[ + pubkey!("HWEoBxYs7ssKuudEjzjmpfJVX7Dvi7wescFsVx2L5yoY"), + pubkey!("95cfoy472fcQHaw4tPGBTKpn6ZQnfEPfBgDQx6gcRmRg"), + pubkey!("3UQUKjhMKaY2S6bjcQD6yHB7utcZt5bfarRCmctpRtUd"), + pubkey!("FogxVNs6Mm2w9rnGL1vkARSwJxvLE8mujTv3LK8RnUhF"), +]; + +// NewYork, +// Frankfurt, +// Amsterdam, +// SLC, +// Tokyo, +// London, +// LosAngeles, +// Default, + +pub const SWQOS_ENDPOINTS_JITO: [&str; 8] = [ + "https://ny.mainnet.block-engine.jito.wtf", + "https://frankfurt.mainnet.block-engine.jito.wtf", + "https://ams.block-engine.jito.wtf", + "https://slc.mainnet.block-engine.jito.wtf", + "https://tokyo.mainnet.block-engine.jito.wtf", + "https://london.mainnet.block-engine.jito.wtf", + "https://ny.mainnet.block-engine.jito.wtf", + "https://mainnet.block-engine.jito.wtf", +]; + +pub const SWQOS_ENDPOINTS_NEXTBLOCK: [&str; 8] = [ + "http://ny.nextblock.io", + "http://fra.nextblock.io", + "http://slc.nextblock.io", + "http://slc.nextblock.io", + "http://tokyo.nextblock.io", + "http://london.nextblock.io", + "http://ny.nextblock.io", + "http://fra.nextblock.io", +]; + +pub const SWQOS_ENDPOINTS_ZERO_SLOT: [&str; 8] = [ + "http://ny.0slot.trade", + "http://de.0slot.trade", + "http://ams.0slot.trade", + "http://ams.0slot.trade", + "http://jp.0slot.trade", + "http://jp.0slot.trade", + "http://la.0slot.trade", + "http://de.0slot.trade", +]; + +pub const SWQOS_ENDPOINTS_TEMPORAL: [&str; 8] = [ + "http://ewr1.nozomi.temporal.xyz", + "http://fra2.nozomi.temporal.xyz", + "http://ams1.nozomi.temporal.xyz", + "http://ams1.nozomi.temporal.xyz", + "http://tyo1.nozomi.temporal.xyz", + "http://sgp1.nozomi.temporal.xyz", + "http://pit1.nozomi.temporal.xyz", + "http://fra2.nozomi.temporal.xyz", +]; + +pub const SWQOS_ENDPOINTS_BLOX: [&str; 8] = [ + "https://ny.solana.dex.blxrbdn.com", + "https://germany.solana.dex.blxrbdn.com", + "https://amsterdam.solana.dex.blxrbdn.com", + "https://amsterdam.solana.dex.blxrbdn.com", + "https://tokyo.solana.dex.blxrbdn.com", + "https://uk.solana.dex.blxrbdn.com", + "https://la.solana.dex.blxrbdn.com", + "https://germany.solana.dex.blxrbdn.com", +]; + diff --git a/src/swqos/bloxroute.rs b/src/swqos/bloxroute.rs new file mode 100644 index 0000000..d03ca5b --- /dev/null +++ b/src/swqos/bloxroute.rs @@ -0,0 +1,140 @@ +use crate::swqos::common::{poll_transaction_confirmation, serialize_transaction_and_encode, FormatBase64VersionedTransaction}; +use rand::seq::IndexedRandom; +use reqwest::Client; +use std::{sync::Arc, time::Instant}; + +use std::time::Duration; +use solana_transaction_status::UiTransactionEncoding; + +use anyhow::Result; +use solana_sdk::transaction::VersionedTransaction; +use crate::swqos::{SwqosType, TradeType}; +use crate::swqos::SwqosClientTrait; + +use crate::{common::SolanaRpcClient, constants::swqos::BLOX_TIP_ACCOUNTS}; + + +#[derive(Clone)] +pub struct BloxrouteClient { + pub endpoint: String, + pub auth_token: String, + pub rpc_client: Arc, + pub http_client: Client, +} + +#[async_trait::async_trait] +impl SwqosClientTrait for BloxrouteClient { + async fn send_transaction(&self, trade_type: TradeType, transaction: &VersionedTransaction) -> Result<()> { + self.send_transaction(trade_type, transaction).await + } + + async fn send_transactions(&self, trade_type: TradeType, transactions: &Vec) -> Result<()> { + self.send_transactions(trade_type, transactions).await + } + + fn get_tip_account(&self) -> Result { + let tip_account = *BLOX_TIP_ACCOUNTS.choose(&mut rand::rng()).or_else(|| BLOX_TIP_ACCOUNTS.first()).unwrap(); + Ok(tip_account.to_string()) + } + + fn get_swqos_type(&self) -> SwqosType { + SwqosType::Bloxroute + } +} + +impl BloxrouteClient { + pub fn new(rpc_url: String, endpoint: String, auth_token: String) -> Self { + let rpc_client = SolanaRpcClient::new(rpc_url); + let http_client = Client::builder() + .pool_idle_timeout(Duration::from_secs(60)) + .pool_max_idle_per_host(64) + .tcp_keepalive(Some(Duration::from_secs(1200))) + .http2_keep_alive_interval(Duration::from_secs(15)) + .timeout(Duration::from_secs(10)) + .connect_timeout(Duration::from_secs(5)) + .build() + .unwrap(); + Self { rpc_client: Arc::new(rpc_client), endpoint, auth_token, http_client } + } + + pub async fn send_transaction(&self, trade_type: TradeType, transaction: &VersionedTransaction) -> Result<()> { + let start_time = Instant::now(); + let (content, signature) = serialize_transaction_and_encode(transaction, UiTransactionEncoding::Base64).await?; + println!(" 交易编码base64: {:?}", start_time.elapsed()); + + let body = serde_json::json!({ + "transaction": { + "content": content, + }, + "frontRunningProtection": false, + "useStakedRPCs": true, + }); + + let endpoint = format!("{}/api/v2/submit", self.endpoint); + let response_text = self.http_client.post(&endpoint) + .body(body.to_string()) + .header("Content-Type", "application/json") + .header("Authorization", self.auth_token.clone()) + .send() + .await? + .text() + .await?; + + // 5. 用 `serde_json::from_str()` 解析 JSON,减少 `.json().await?` 额外等待 + if let Ok(response_json) = serde_json::from_str::(&response_text) { + if response_json.get("result").is_some() { + println!(" bloxroute{}提交: {:?}", trade_type, start_time.elapsed()); + } else if let Some(_error) = response_json.get("error") { + eprintln!(" bloxroute{}提交失败: {:?}", trade_type, _error); + } + } + + let start_time: Instant = Instant::now(); + match poll_transaction_confirmation(&self.rpc_client, signature).await { + Ok(_) => (), + Err(_) => (), + } + + println!(" bloxroute{}确认: {:?}", trade_type, start_time.elapsed()); + + Ok(()) + } + + pub async fn send_transactions(&self, trade_type: TradeType, transactions: &Vec) -> Result<()> { + let start_time = Instant::now(); + println!(" 交易编码base64: {:?}", start_time.elapsed()); + + let body = serde_json::json!({ + "entries": transactions + .iter() + .map(|tx| { + serde_json::json!({ + "transaction": { + "content": tx.to_base64_string(), + }, + }) + }) + .collect::>(), + }); + + let endpoint = format!("{}/api/v2/submit-batch", self.endpoint); + let response_text = self.http_client.post(&endpoint) + .body(body.to_string()) + .header("Content-Type", "application/json") + .header("Authorization", self.auth_token.clone()) + .send() + .await? + .text() + .await?; + + if let Ok(response_json) = serde_json::from_str::(&response_text) { + if response_json.get("result").is_some() { + println!(" bloxroute{}提交: {:?}", trade_type, start_time.elapsed()); + } else if let Some(_error) = response_json.get("error") { + eprintln!(" bloxroute{}提交失败: {:?}", trade_type, _error); + } + } + + Ok(()) + } +} \ No newline at end of file diff --git a/src/swqos/common.rs b/src/swqos/common.rs index e43a8fe..ec45623 100755 --- a/src/swqos/common.rs +++ b/src/swqos/common.rs @@ -14,59 +14,6 @@ use base64::engine::general_purpose::{self, STANDARD}; use reqwest::Client; use solana_sdk::transaction::VersionedTransaction; -// NewYork, -// Frankfurt, -// Amsterdam, -// SLC, -// Tokyo, -// London, -// LosAngeles, -// Default, - -pub const SWQOS_ENDPOINTS_JITO: [&str; 8] = [ - "https://ny.mainnet.block-engine.jito.wtf", - "https://frankfurt.mainnet.block-engine.jito.wtf", - "https://ams.block-engine.jito.wtf", - "https://slc.mainnet.block-engine.jito.wtf", - "https://tokyo.mainnet.block-engine.jito.wtf", - "https://london.mainnet.block-engine.jito.wtf", - "https://ny.mainnet.block-engine.jito.wtf", - "https://mainnet.block-engine.jito.wtf", -]; - -pub const SWQOS_ENDPOINTS_NEXTBLOCK: [&str; 8] = [ - "http://ny.nextblock.io", - "http://fra.nextblock.io", - "http://slc.nextblock.io", - "http://slc.nextblock.io", - "http://tokyo.nextblock.io", - "http://london.nextblock.io", - "http://ny.nextblock.io", - "http://fra.nextblock.io", -]; - -pub const SWQOS_ENDPOINTS_ZERO_SLOT: [&str; 8] = [ - "http://ny.0slot.trade", - "http://de.0slot.trade", - "http://ams.0slot.trade", - "http://ams.0slot.trade", - "http://jp.0slot.trade", - "http://jp.0slot.trade", - "http://la.0slot.trade", - "http://de.0slot.trade", -]; - -pub const SWQOS_ENDPOINTS_TEMPORAL: [&str; 8] = [ - "http://ewr1.nozomi.temporal.xyz", - "http://fra2.nozomi.temporal.xyz", - "http://ams1.nozomi.temporal.xyz", - "http://ams1.nozomi.temporal.xyz", - "http://tyo1.nozomi.temporal.xyz", - "http://sgp1.nozomi.temporal.xyz", - "http://pit1.nozomi.temporal.xyz", - "http://fra2.nozomi.temporal.xyz", -]; - pub trait FormatBase64VersionedTransaction { fn to_base64_string(&self) -> String; } diff --git a/src/swqos/jito.rs b/src/swqos/jito.rs index af7e6e0..e4a43bf 100755 --- a/src/swqos/jito.rs +++ b/src/swqos/jito.rs @@ -13,7 +13,7 @@ use solana_sdk::transaction::VersionedTransaction; use crate::swqos::{SwqosType, TradeType}; use crate::swqos::SwqosClientTrait; -use crate::{common::SolanaRpcClient, constants::pumpfun::accounts::JITO_TIP_ACCOUNTS}; +use crate::{common::SolanaRpcClient, constants::swqos::JITO_TIP_ACCOUNTS}; pub struct JitoClient { diff --git a/src/swqos/mod.rs b/src/swqos/mod.rs index c1bd221..1e0987d 100755 --- a/src/swqos/mod.rs +++ b/src/swqos/mod.rs @@ -4,13 +4,14 @@ pub mod jito; pub mod nextblock; pub mod zeroslot; pub mod temporal; +pub mod bloxroute; use solana_sdk::transaction::VersionedTransaction; use tokio::sync::RwLock; use anyhow::Result; -use crate::swqos::common::{SWQOS_ENDPOINTS_JITO, SWQOS_ENDPOINTS_NEXTBLOCK, SWQOS_ENDPOINTS_TEMPORAL, SWQOS_ENDPOINTS_ZERO_SLOT}; +use crate::constants::swqos::{SWQOS_ENDPOINTS_BLOX, SWQOS_ENDPOINTS_JITO, SWQOS_ENDPOINTS_NEXTBLOCK, SWQOS_ENDPOINTS_TEMPORAL, SWQOS_ENDPOINTS_ZERO_SLOT}; lazy_static::lazy_static! { static ref TIP_ACCOUNT_CACHE: RwLock> = RwLock::new(Vec::new()); @@ -42,6 +43,7 @@ pub enum SwqosType { NextBlock, ZeroSlot, Temporal, + Bloxroute, Rpc, } @@ -82,6 +84,7 @@ impl SwqosConfig { SwqosType::NextBlock => SWQOS_ENDPOINTS_NEXTBLOCK[region as usize].to_string(), SwqosType::ZeroSlot => SWQOS_ENDPOINTS_ZERO_SLOT[region as usize].to_string(), SwqosType::Temporal => SWQOS_ENDPOINTS_TEMPORAL[region as usize].to_string(), + SwqosType::Bloxroute => SWQOS_ENDPOINTS_BLOX[region as usize].to_string(), SwqosType::Rpc => "".to_string(), }); diff --git a/src/swqos/nextblock.rs b/src/swqos/nextblock.rs index b7dc1cf..7abaec8 100755 --- a/src/swqos/nextblock.rs +++ b/src/swqos/nextblock.rs @@ -12,7 +12,7 @@ use solana_sdk::transaction::VersionedTransaction; use crate::swqos::{SwqosType, TradeType}; use crate::swqos::SwqosClientTrait; -use crate::{common::SolanaRpcClient, constants::pumpfun::accounts::NEXTBLOCK_TIP_ACCOUNTS}; +use crate::{common::SolanaRpcClient, constants::swqos::NEXTBLOCK_TIP_ACCOUNTS}; #[derive(Clone)] pub struct NextBlockClient { diff --git a/src/swqos/temporal.rs b/src/swqos/temporal.rs index 2002e3c..b6de6c8 100755 --- a/src/swqos/temporal.rs +++ b/src/swqos/temporal.rs @@ -15,7 +15,7 @@ use solana_sdk::transaction::VersionedTransaction; use crate::swqos::{SwqosType, TradeType}; use crate::swqos::SwqosClientTrait; -use crate::{common::SolanaRpcClient, constants::pumpfun::accounts::NOZOMI_TIP_ACCOUNTS}; +use crate::{common::SolanaRpcClient, constants::swqos::NOZOMI_TIP_ACCOUNTS}; #[derive(Clone)] diff --git a/src/swqos/zeroslot.rs b/src/swqos/zeroslot.rs index d9946c3..dc4466d 100755 --- a/src/swqos/zeroslot.rs +++ b/src/swqos/zeroslot.rs @@ -8,12 +8,11 @@ use std::time::Duration; use solana_transaction_status::UiTransactionEncoding; use anyhow::Result; -use solana_sdk::signature::Signature; use solana_sdk::transaction::VersionedTransaction; use crate::swqos::{SwqosType, TradeType}; use crate::swqos::SwqosClientTrait; -use crate::{common::SolanaRpcClient, constants::pumpfun::accounts::ZEROSLOT_TIP_ACCOUNTS}; +use crate::{common::SolanaRpcClient, constants::swqos::ZEROSLOT_TIP_ACCOUNTS}; #[derive(Clone)]