feat: add Node1 minimum tip amount validation (0.002 SOL)
- Add intelligent tip amount detection for Node1 - Implement MIN_TIP_AMOUNT check in transaction builder - Add MIN_TIP_AMOUNT.md documentation - Optimize pumpswap instruction handling - Update common utility functions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -200,11 +200,13 @@ impl InstructionBuilder for PumpSwapInstructionBuilder {
|
||||
data[16..24].copy_from_slice(&token_amount.to_le_bytes());
|
||||
}
|
||||
|
||||
instructions.push(Instruction {
|
||||
let buy_instruction = Instruction {
|
||||
program_id: accounts::AMM_PROGRAM,
|
||||
accounts,
|
||||
accounts: accounts.clone(),
|
||||
data: data.to_vec(),
|
||||
});
|
||||
};
|
||||
|
||||
instructions.push(buy_instruction);
|
||||
if close_wsol_ata {
|
||||
// Close wSOL ATA account, reclaim rent
|
||||
instructions.extend(crate::trading::common::close_wsol(¶ms.payer.pubkey()));
|
||||
@@ -375,11 +377,13 @@ impl InstructionBuilder for PumpSwapInstructionBuilder {
|
||||
data[16..24].copy_from_slice(&token_amount.to_le_bytes());
|
||||
}
|
||||
|
||||
instructions.push(Instruction {
|
||||
let sell_instruction = Instruction {
|
||||
program_id: accounts::AMM_PROGRAM,
|
||||
accounts,
|
||||
accounts: accounts.clone(),
|
||||
data: data.to_vec(),
|
||||
});
|
||||
};
|
||||
|
||||
instructions.push(sell_instruction);
|
||||
|
||||
if close_wsol_ata {
|
||||
instructions.extend(crate::trading::common::close_wsol(¶ms.payer.pubkey()));
|
||||
|
||||
Reference in New Issue
Block a user