Skip to main content

Module pumpfun_fee_enrich

Module pumpfun_fee_enrich 

Source
Expand description

同笔交易内 Pump 事件后处理(零 RPC,供 gRPC/Shred 热路径):

  • Create/CreateV2 + 后续 Buy 分离时,将 Buy 的 fee recipient 回填到 observed_fee_recipient
  • Create / CreateV2 指令里的 is_cashback_enabledis_mayhem_mode 合并进同一 mint 的 Trade 事件, 避免仅有外层指令、TradeEvent 日志缺字段时 sol-trade-sdk 误判返现与 Mayhem fee 池

Functions§

enrich_create_observed_fee_recipient
扫描同签名下的买入类事件,按 mint 记录 fee_recipient(ShredStream 外层的 buy 已从 accounts[1] 解析)。
enrich_create_quote_mint_from_trades
enrich_create_v2_from_create_events
Copy the official CreateEvent payload onto the same-mint create_v2 instruction event. The create_v2 instruction itself carries accounts and flags; the event payload carries the initial reserves and quote mint used by quote-denominated pools.
enrich_pumpfun_same_tx_post_merge
合并调用:fee 回填 + Create→Trade 标志(gRPC / Shred 在 merge 之后调用一次即可)。
enrich_pumpfun_trades_from_create_instructions
将同笔交易中 Create / CreateV2 的 is_cashback_enabledis_mayhem_mode 并入 Trade 事件(与官方 create_v2 / bonding 语义一致)。