feat: Upgrade SDK version to 0.2.5 and enhance PumpSwap functionality

- Upgrade SDK version from 0.2.4 to 0.2.5
- Update solana-streamer-sdk dependency from 0.1.3 to 0.1.4
- Enhance PumpSwap examples with pool address parameter support
This commit is contained in:
ysq
2025-07-25 16:55:33 +08:00
parent 7a05ec216c
commit 92bc7aecfa
4 changed files with 34 additions and 13 deletions
+11 -4
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.4" }
sol-trade-sdk = { path = "./sol-trade-sdk", version = "0.2.5" }
```
### Use crates.io
```toml
# Add to your Cargo.toml
sol-trade-sdk = "0.2.4"
sol-trade-sdk = "0.2.5"
```
## Usage Examples
@@ -358,6 +358,7 @@ async fn test_pumpswap() -> AnyResult<()> {
let buy_sol_amount = 100_000;
let slippage_basis_points = Some(100);
let recent_blockhash = trade_client.rpc.get_latest_blockhash().await?;
let pool_address = Pubkey::from_str("xxxxxxx")?;
println!("Buying tokens from PumpSwap...");
// buy
@@ -369,7 +370,10 @@ async fn test_pumpswap() -> AnyResult<()> {
slippage_basis_points,
recent_blockhash,
None,
None,
Some(Box::new(PumpSwapParams {
pool: Some(pool_address),
auto_handle_wsol: true,
})),
)
.await?;
@@ -386,7 +390,10 @@ async fn test_pumpswap() -> AnyResult<()> {
slippage_basis_points,
recent_blockhash,
None,
None,
Some(Box::new(PumpSwapParams {
pool: Some(pool_address),
auto_handle_wsol: true,
})),
)
.await?;