Make use_exact_sol_amount optional with true default for PumpFun/PumpSwap
- Change use_exact_sol_amount from bool to Option<bool> - Default to true (via unwrap_or) for PumpFun and PumpSwap DEXes - Option is ignored for other DEXes (Raydium, Bonk, Meteora) - Update all examples to use None (which defaults to true for applicable DEXes) - Update README documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -634,6 +634,7 @@ async fn handle_buy_pumpfun(
|
||||
fixed_output_token_amount: None,
|
||||
gas_fee_strategy: gas_fee_strategy,
|
||||
simulate: false,
|
||||
use_exact_sol_amount: None,
|
||||
};
|
||||
match client.buy(buy_params).await {
|
||||
Ok((_, signature, _)) => {
|
||||
@@ -688,6 +689,7 @@ async fn handle_buy_pumpswap(
|
||||
fixed_output_token_amount: None,
|
||||
gas_fee_strategy: gas_fee_strategy,
|
||||
simulate: false,
|
||||
use_exact_sol_amount: None,
|
||||
};
|
||||
match client.buy(buy_params).await {
|
||||
Ok((_, signature, _)) => {
|
||||
@@ -741,6 +743,7 @@ async fn handle_buy_bonk(
|
||||
fixed_output_token_amount: None,
|
||||
gas_fee_strategy: gas_fee_strategy,
|
||||
simulate: false,
|
||||
use_exact_sol_amount: None,
|
||||
};
|
||||
match client.buy(buy_params).await {
|
||||
Ok((_, signature, _)) => {
|
||||
@@ -798,6 +801,7 @@ async fn handle_buy_raydium_v4(
|
||||
fixed_output_token_amount: None,
|
||||
gas_fee_strategy: gas_fee_strategy,
|
||||
simulate: false,
|
||||
use_exact_sol_amount: None,
|
||||
};
|
||||
match client.buy(buy_params).await {
|
||||
Ok((_, signature, _)) => {
|
||||
@@ -855,6 +859,7 @@ async fn handle_buy_raydium_cpmm(
|
||||
fixed_output_token_amount: None,
|
||||
gas_fee_strategy: gas_fee_strategy,
|
||||
simulate: false,
|
||||
use_exact_sol_amount: None,
|
||||
};
|
||||
match client.buy(buy_params).await {
|
||||
Ok((_, signature, _)) => {
|
||||
|
||||
Reference in New Issue
Block a user