feat: add flexible nonce parameter support

- Add nonce_account and current_nonce to trade parameters
- Remove hardcoded NonceCache dependency from nonce_manager
- Update examples and documentation for new nonce usage
- Fix nonce documentation errors and improve clarity
This commit is contained in:
ysq
2025-09-19 18:02:11 +08:00
parent a53038855e
commit 4907aafead
26 changed files with 214 additions and 71 deletions
@@ -105,6 +105,8 @@ async fn pumpfun_sniper_trade_with_shreds(trade_info: PumpFunTradeEvent) -> AnyR
close_wsol_ata: true,
create_mint_ata: true,
open_seed_optimize: false,
nonce_account: None,
current_nonce: None,
};
client.buy(buy_params).await?;
@@ -132,6 +134,8 @@ async fn pumpfun_sniper_trade_with_shreds(trade_info: PumpFunTradeEvent) -> AnyR
create_wsol_ata: true,
close_wsol_ata: true,
open_seed_optimize: false,
nonce_account: None,
current_nonce: None,
};
client.sell(sell_params).await?;