From 2f0cadee98e0aa3b3b05f1f1ac2077282dc20e22 Mon Sep 17 00:00:00 2001 From: 4lve Date: Tue, 22 Oct 2024 14:58:02 +0200 Subject: [PATCH 1/2] Bump solana to 2.0.x --- Cargo.toml | 16 ++++++++-------- src/types/types.rs | 4 ++-- src/websocket.rs | 2 -- tests/test_factory.rs | 6 +++--- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9a2f72d3..402e64dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "helius" -version = "0.2.1" +version = "0.2.2" edition = "2021" description = "An asynchronous Helius Rust SDK for building the future of Solana" keywords = ["helius", "solana", "asynchronous-sdk", "das", "cryptocurrency"] @@ -24,16 +24,16 @@ semver = "1.0.23" serde = "1.0.198" serde-enum-str = "0.4.0" serde_json = "1.0.116" -solana-account-decoder = "=1.17.0" -solana-client = "=1.17.0" -solana-program = "=1.17.0" -solana-rpc-client-api = "=1.17.0" -solana-sdk = "=1.17.0" -solana-transaction-status = "=1.17.0" +solana-account-decoder = "2.0" +solana-client = "2.0" +solana-program = "2.0" +solana-rpc-client-api = "2.0" +solana-sdk = "2.0" +solana-transaction-status = "2.0" thiserror = "1.0.58" tokio = { version = "1.37.0", features = ["macros", "rt-multi-thread", "net"] } tokio-stream = "0.1.15" -tokio-tungstenite = { version = "0.21.0", features = ["native-tls", "handshake"] } +tokio-tungstenite = { version = "0.24.0", features = ["native-tls", "handshake"] } url = "2.5.0" [dev-dependencies] diff --git a/src/types/types.rs b/src/types/types.rs index 062ef13f..e63af218 100644 --- a/src/types/types.rs +++ b/src/types/types.rs @@ -34,11 +34,11 @@ impl HeliusEndpoints { rpc: "https://devnet.helius-rpc.com/".to_string(), }, Cluster::MainnetBeta => HeliusEndpoints { - api: "https://api.helius-rpc.com/".to_string(), + api: "https://api-mainnet.helius-rpc.com/".to_string(), rpc: "https://mainnet.helius-rpc.com/".to_string(), }, Cluster::StakedMainnetBeta => HeliusEndpoints { - api: "https://api.helius-rpc.com/".to_string(), + api: "https://api-mainnet.helius-rpc.com/".to_string(), rpc: "https://staked.helius-rpc.com/".to_string(), }, } diff --git a/src/websocket.rs b/src/websocket.rs index c217f4b0..86558b68 100644 --- a/src/websocket.rs +++ b/src/websocket.rs @@ -28,7 +28,6 @@ use tokio_tungstenite::{ }, MaybeTlsStream, WebSocketStream, }; -use url::Url; pub const ENHANCED_WEBSOCKET_URL: &str = "wss://atlas-mainnet.helius-rpc.com?api-key="; const DEFAULT_PING_DURATION_SECONDS: u64 = 10; @@ -54,7 +53,6 @@ pub struct EnhancedWebsocket { impl EnhancedWebsocket { /// Expects enhanced websocket endpoint: wss://atlas-mainnet.helius-rpc.com?api-key= pub async fn new(url: &str) -> Result { - let url = Url::parse(url)?; let (ws, _response) = connect_async(url).await.map_err(HeliusError::Tungstenite)?; let (subscribe_sender, subscribe_receiver) = mpsc::unbounded_channel(); diff --git a/tests/test_factory.rs b/tests/test_factory.rs index 62a3ec00..55826eb4 100644 --- a/tests/test_factory.rs +++ b/tests/test_factory.rs @@ -17,7 +17,7 @@ fn test_factory_create_mainnet_instance() { let helius: Helius = factory.create(Cluster::MainnetBeta).unwrap(); assert_eq!(helius.config.api_key, "valid_api_key"); - assert_eq!(helius.config.endpoints.api, "https://api.helius-rpc.com/"); + assert_eq!(helius.config.endpoints.api, "https://api-mainnet.helius-rpc.com/"); assert_eq!(helius.config.endpoints.rpc, "https://mainnet.helius-rpc.com/"); } @@ -27,7 +27,7 @@ fn test_factory_create_staked_mainnet_instance() { let helius: Helius = factory.create(Cluster::StakedMainnetBeta).unwrap(); assert_eq!(helius.config.api_key, "valid_api_key"); - assert_eq!(helius.config.endpoints.api, "https://api.helius-rpc.com/"); + assert_eq!(helius.config.endpoints.api, "https://api-mainnet.helius-rpc.com/"); assert_eq!(helius.config.endpoints.rpc, "https://staked.helius-rpc.com/"); } @@ -40,6 +40,6 @@ fn test_factory_create_with_reqwest() { .unwrap(); assert_eq!(helius.config.api_key, "valid_api_key"); - assert_eq!(helius.config.endpoints.api, "https://api.helius-rpc.com/"); + assert_eq!(helius.config.endpoints.api, "https://api-mainnet.helius-rpc.com/"); assert_eq!(helius.config.endpoints.rpc, "https://mainnet.helius-rpc.com/"); } From b3e4376db738cce7d7e1c35343ec6f3a1882097f Mon Sep 17 00:00:00 2001 From: 4lve Date: Tue, 22 Oct 2024 23:00:15 +0200 Subject: [PATCH 2/2] Bump versions again --- Cargo.toml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5be78111..40e58327 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ bincode = "1.3.3" chrono = { version = "0.4.11", features = ["serde"] } futures = "0.3.30" futures-util = "0.3.30" -mpl-token-metadata = "4.1.2" +mpl-token-metadata = { version = "5.0.0-beta.0" } phf = { version = "0.11.2", features = ["macros"] } rand = "0.8.5" reqwest = { version = "0.11", features = ["json"], default-features = false } @@ -36,7 +36,7 @@ tokio = { version = "1.37.0", features = ["macros", "rt-multi-thread", "net"] } tokio-stream = "0.1.15" tokio-tungstenite = { version = "0.24.0", features = ["native-tls", "handshake"] } url = "2.5.0" -spl-token = { version = "3.5.0", features = ["no-entrypoint"] } +spl-token = { version = "6.0", features = ["no-entrypoint"] } [dev-dependencies] mockito = "1.4.0" @@ -44,4 +44,5 @@ mockito = "1.4.0" [features] default = ["native-tls"] native-tls = ["reqwest/native-tls"] -rustls = ["reqwest/rustls-tls"] \ No newline at end of file +rustls = ["reqwest/rustls-tls"] +