feat(pumpfun): parse 17th instruction account (account field)

- Add PumpFunTradeEvent.account: Option<Pubkey> for the 17th instruction
  account (index 16), labeled as 'Account' on block explorers.
- Fill account in parse_buy_instruction, parse_buy_exact_sol_in_instruction,
  and parse_sell_instruction when accounts.get(16) is present.
- Merge account from CPI log event into instruction event when merging.

Made-with: Cursor
This commit is contained in:
Wood
2026-03-08 11:08:46 +08:00
parent 2da2b06e1f
commit 20a1048020
3 changed files with 19 additions and 18 deletions
@@ -31,6 +31,9 @@ pub fn merge(instruction_event: &mut DexEvent, cpi_log_event: DexEvent) {
e.cashback_fee_basis_points = cpie.cashback_fee_basis_points;
e.cashback = cpie.cashback;
e.is_cashback_coin = cpie.is_cashback_coin;
if cpie.account.is_some() {
e.account = cpie.account;
}
}
_ => {}
},