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:
Wood
2025-11-17 23:34:28 +08:00
co-authored by Claude
parent 8f945995a4
commit 7fb4fd35d1
7 changed files with 167 additions and 17 deletions
+10 -6
View File
@@ -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(&params.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(&params.payer.pubkey()));