Add buy_exact_sol_in and buy_exact_quote_in instruction support
- Add BUY_EXACT_SOL_IN_DISCRIMINATOR for PumpFun - Add BUY_EXACT_QUOTE_IN_DISCRIMINATOR for PumpSwap - Add use_exact_in_instruction field to SwapParams - When enabled, uses exact input instructions that spend exactly the specified SOL/quote amount with slippage applied to output tokens - Defaults to false for backwards compatibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -508,6 +508,7 @@ impl TradingClient {
|
||||
fixed_output_amount: params.fixed_output_token_amount,
|
||||
gas_fee_strategy: params.gas_fee_strategy,
|
||||
simulate: params.simulate,
|
||||
use_exact_in_instruction: false,
|
||||
};
|
||||
|
||||
// Validate protocol params
|
||||
@@ -617,6 +618,7 @@ impl TradingClient {
|
||||
fixed_output_amount: params.fixed_output_token_amount,
|
||||
gas_fee_strategy: params.gas_fee_strategy,
|
||||
simulate: params.simulate,
|
||||
use_exact_in_instruction: false,
|
||||
};
|
||||
|
||||
// Validate protocol params
|
||||
|
||||
Reference in New Issue
Block a user