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:
@@ -154,6 +154,11 @@ pub mod accounts {
|
||||
};
|
||||
}
|
||||
|
||||
/// Instruction discriminators for PumpFun program
|
||||
pub const BUY_DISCRIMINATOR: [u8; 8] = [102, 6, 61, 18, 1, 218, 235, 234];
|
||||
pub const BUY_EXACT_SOL_IN_DISCRIMINATOR: [u8; 8] = [56, 252, 116, 8, 158, 223, 205, 95];
|
||||
pub const SELL_DISCRIMINATOR: [u8; 8] = [51, 230, 133, 164, 1, 127, 131, 173];
|
||||
|
||||
pub struct Symbol;
|
||||
|
||||
impl Symbol {
|
||||
|
||||
@@ -136,6 +136,7 @@ pub mod accounts {
|
||||
}
|
||||
|
||||
pub const BUY_DISCRIMINATOR: [u8; 8] = [102, 6, 61, 18, 1, 218, 235, 234];
|
||||
pub const BUY_EXACT_QUOTE_IN_DISCRIMINATOR: [u8; 8] = [198, 46, 21, 82, 180, 217, 232, 112];
|
||||
pub const SELL_DISCRIMINATOR: [u8; 8] = [51, 230, 133, 164, 1, 127, 131, 173];
|
||||
|
||||
// Find a pool for a specific mint
|
||||
|
||||
Reference in New Issue
Block a user