feat: upgrade dependencies and bump to v0.2.15

This commit is contained in:
ysq
2025-08-05 18:28:13 +08:00
parent 1f7e60bf93
commit 49acf2d7f7
4 changed files with 25 additions and 25 deletions
+18 -18
View File
@@ -1,6 +1,6 @@
[package]
name = "sol-trade-sdk"
version = "0.2.14"
version = "0.2.15"
edition = "2021"
authors = ["William <byteblock6@gmail.com>", "sgxiang <sgxiang@gmail.com>", "wei <1415121722@qq.com>"]
repository = "https://github.com/0xfnzero/sol-trade-sdk"
@@ -13,22 +13,22 @@ readme = "README.md"
crate-type = ["cdylib", "rlib"]
[dependencies]
solana-streamer-sdk = "0.1.9"
solana-sdk = "2.1.16"
solana-client = "2.1.16"
solana-program = "2.1.16"
solana-rpc-client = "2.1.16"
solana-rpc-client-api = "2.1.16"
solana-transaction-status = "2.1.16"
solana-account-decoder = "2.1.16"
solana-hash = "2.1.16"
solana-entry = "2.1.16"
solana-rpc-client-nonce-utils = "2.1.16"
solana-perf = "2.1.16"
solana-metrics = "2.1.16"
solana-streamer-sdk = "0.1.11"
solana-sdk = "2.3.0"
solana-client = "2.3.6"
solana-program = "2.3.0"
solana-rpc-client = "2.3.6"
solana-rpc-client-api = "2.3.6"
solana-transaction-status = "2.3.6"
solana-account-decoder = "2.3.6"
solana-hash = "2.3.0"
solana-entry = "2.3.6"
solana-rpc-client-nonce-utils = "2.3.6"
solana-perf = "2.3.6"
solana-metrics = "2.3.6"
spl-token = "8.0.0"
spl-token-2022 = { version = "8.0.0", features = ["no-entrypoint"] }
spl-associated-token-account = "6.0.0"
spl-associated-token-account = "7.0.0"
borsh = { version = "1.5.3", features = ["derive"] }
isahc = "1.7.2"
serde = { version = "1.0.215", features = ["derive"] }
@@ -40,8 +40,8 @@ bs58 = "0.5.1"
rand = "0.9.0"
bincode = "1.3.3"
anyhow = "1.0.90"
yellowstone-grpc-client = { version = "6.0.0" }
yellowstone-grpc-proto = { version = "6.0.0" }
yellowstone-grpc-client = { version = "8.0.0" }
yellowstone-grpc-proto = { version = "8.0.0" }
reqwest = { version = "0.12.12", features = ["json", "multipart"] }
tokio = { version = "1.42.0" , features = ["full", "rt-multi-thread"]}
tonic = { version = "0.12.3", features = ["tls", "tls-roots", "tls-webpki-roots"] }
@@ -66,6 +66,6 @@ hex = "0.4.3"
bytemuck = { version = "1.4.0" }
arrayref = "0.3.6"
borsh-derive = "1.5.5"
indicatif = "0.17.11"
indicatif = "0.18.0"
pumpfun_program = { version = "4.3.0", package = "pumpfun" }
solana-system-interface = "1.0.0"
+2 -2
View File
@@ -31,14 +31,14 @@ Add the dependency to your `Cargo.toml`:
```toml
# Add to your Cargo.toml
sol-trade-sdk = { path = "./sol-trade-sdk", version = "0.2.14" }
sol-trade-sdk = { path = "./sol-trade-sdk", version = "0.2.15" }
```
### Use crates.io
```toml
# Add to your Cargo.toml
sol-trade-sdk = "0.2.14"
sol-trade-sdk = "0.2.15"
```
## Usage Examples
+2 -2
View File
@@ -31,14 +31,14 @@ git clone https://github.com/0xfnzero/sol-trade-sdk
```toml
# 添加到您的 Cargo.toml
sol-trade-sdk = { path = "./sol-trade-sdk", version = "0.2.14" }
sol-trade-sdk = { path = "./sol-trade-sdk", version = "0.2.15" }
```
### 使用 crates.io
```toml
# 添加到您的 Cargo.toml
sol-trade-sdk = "0.2.14"
sol-trade-sdk = "0.2.15"
```
## 使用示例
+3 -3
View File
@@ -21,7 +21,7 @@ use crate::protos::{
/// Converts a Solana packet to a protobuf packet
/// NOTE: the packet.data() function will filter packets marked for discard
pub fn packet_to_proto_packet(p: &Packet) -> Option<ProtoPacket> {
pub fn packet_to_proto_packet(p: &solana_perf::packet::PacketRef<'_>) -> Option<ProtoPacket> {
Some(ProtoPacket {
data: p.data(..)?.to_vec(),
meta: Some(ProtoMeta {
@@ -46,8 +46,8 @@ pub fn packet_batches_to_proto_packets(
) -> impl Iterator<Item = ProtoPacket> + '_ {
batches
.iter()
.flat_map(|b| b.iter().filter_map(packet_to_proto_packet))
}
.flat_map(|b| b.iter().filter_map(|p| packet_to_proto_packet(&p)))
}
/// converts from a protobuf packet to packet
pub fn proto_packet_to_packet(p: &ProtoPacket) -> Packet {