From 9d30c5e9add2d286ee03786c11cfee77bca4ff7f Mon Sep 17 00:00:00 2001 From: wood Date: Mon, 7 Jul 2025 01:30:57 +0800 Subject: [PATCH] remove define --- src/swqos/common.rs | 53 +++++++++++++++++++++++++++++++++++++++++++++ src/swqos/define.rs | 52 -------------------------------------------- src/swqos/mod.rs | 4 +--- 3 files changed, 54 insertions(+), 55 deletions(-) delete mode 100755 src/swqos/define.rs diff --git a/src/swqos/common.rs b/src/swqos/common.rs index ec45623..e43a8fe 100755 --- a/src/swqos/common.rs +++ b/src/swqos/common.rs @@ -14,6 +14,59 @@ 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/define.rs b/src/swqos/define.rs deleted file mode 100755 index aaa540c..0000000 --- a/src/swqos/define.rs +++ /dev/null @@ -1,52 +0,0 @@ -// 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", -]; \ No newline at end of file diff --git a/src/swqos/mod.rs b/src/swqos/mod.rs index 79d5dbe..c1bd221 100755 --- a/src/swqos/mod.rs +++ b/src/swqos/mod.rs @@ -1,18 +1,16 @@ - pub mod common; pub mod solana_rpc; pub mod jito; pub mod nextblock; pub mod zeroslot; pub mod temporal; -pub mod define; use solana_sdk::transaction::VersionedTransaction; use tokio::sync::RwLock; use anyhow::Result; -use crate::swqos::define::{SWQOS_ENDPOINTS_JITO, SWQOS_ENDPOINTS_NEXTBLOCK, SWQOS_ENDPOINTS_TEMPORAL, SWQOS_ENDPOINTS_ZERO_SLOT}; +use crate::swqos::common::{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());