mirror of
https://github.com/0xfnzero/solana-streamer.git
synced 2026-08-16 02:18:05 +00:00
feat(pumpswap): align pool account and events with cashback IDL
- Extend on-chain Pool layout (is_cashback_coin, 7-byte reserved, 244 bytes) with backward-compatible decode for 236-byte legacy accounts - Decode Buy/Sell program logs manually: min_base_amount_out, ix_name, cashback fields; optional sell cashback when payload >= 368 bytes - Set ix_name on buy / buy_exact_quote_in instructions; merge new fields in CPI log merger - Add read_i64_le helper and pool layout unit test Made-with: Cursor
This commit is contained in:
@@ -200,6 +200,11 @@ pub fn merge(instruction_event: &mut DexEvent, cpi_log_event: DexEvent) {
|
||||
e.total_claimed_tokens = cpie.total_claimed_tokens;
|
||||
e.current_sol_volume = cpie.current_sol_volume;
|
||||
e.last_update_timestamp = cpie.last_update_timestamp;
|
||||
e.min_base_amount_out = cpie.min_base_amount_out;
|
||||
e.ix_name = cpie.ix_name.clone();
|
||||
e.cashback_fee_basis_points = cpie.cashback_fee_basis_points;
|
||||
e.cashback = cpie.cashback;
|
||||
e.is_pump_pool = cpie.is_pump_pool;
|
||||
}
|
||||
_ => {}
|
||||
},
|
||||
@@ -228,6 +233,9 @@ pub fn merge(instruction_event: &mut DexEvent, cpi_log_event: DexEvent) {
|
||||
e.coin_creator = cpie.coin_creator;
|
||||
e.coin_creator_fee_basis_points = cpie.coin_creator_fee_basis_points;
|
||||
e.coin_creator_fee = cpie.coin_creator_fee;
|
||||
e.cashback_fee_basis_points = cpie.cashback_fee_basis_points;
|
||||
e.cashback = cpie.cashback;
|
||||
e.is_pump_pool = cpie.is_pump_pool;
|
||||
}
|
||||
_ => {}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user