Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump solana to 2.0.x #80

Merged
merged 3 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"]
Expand All @@ -17,31 +17,32 @@ 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 }
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"
spl-token = { version = "3.5.0", features = ["no-entrypoint"] }
spl-token = { version = "6.0", features = ["no-entrypoint"] }

[dev-dependencies]
mockito = "1.4.0"

[features]
default = ["native-tls"]
native-tls = ["reqwest/native-tls"]
rustls = ["reqwest/rustls-tls"]
rustls = ["reqwest/rustls-tls"]

4 changes: 2 additions & 2 deletions src/types/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
},
}
Expand Down
2 changes: 0 additions & 2 deletions src/websocket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -54,7 +53,6 @@ pub struct EnhancedWebsocket {
impl EnhancedWebsocket {
/// Expects enhanced websocket endpoint: wss://atlas-mainnet.helius-rpc.com?api-key=<API_KEY>
pub async fn new(url: &str) -> Result<Self> {
let url = Url::parse(url)?;
let (ws, _response) = connect_async(url).await.map_err(HeliusError::Tungstenite)?;

let (subscribe_sender, subscribe_receiver) = mpsc::unbounded_channel();
Expand Down
6 changes: 3 additions & 3 deletions tests/test_factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/");
}

Expand All @@ -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/");
}

Expand All @@ -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/");
}
Loading