mirror of
https://github.com/0xfnzero/solana-streamer.git
synced 2026-08-14 17:38:05 +00:00
feat: update PumpSwap event parser with token program fields
This commit is contained in:
@@ -51,6 +51,10 @@ pub struct PumpSwapBuyEvent {
|
||||
pub coin_creator_vault_ata: Pubkey,
|
||||
#[borsh(skip)]
|
||||
pub coin_creator_vault_authority: Pubkey,
|
||||
#[borsh(skip)]
|
||||
pub base_token_program: Pubkey,
|
||||
#[borsh(skip)]
|
||||
pub quote_token_program: Pubkey,
|
||||
}
|
||||
|
||||
pub const PUMP_SWAP_BUY_EVENT_LOG_SIZE: usize = 385;
|
||||
@@ -130,6 +134,10 @@ pub struct PumpSwapSellEvent {
|
||||
pub coin_creator_vault_ata: Pubkey,
|
||||
#[borsh(skip)]
|
||||
pub coin_creator_vault_authority: Pubkey,
|
||||
#[borsh(skip)]
|
||||
pub base_token_program: Pubkey,
|
||||
#[borsh(skip)]
|
||||
pub quote_token_program: Pubkey,
|
||||
}
|
||||
|
||||
pub const PUMP_SWAP_SELL_EVENT_LOG_SIZE: usize = 352;
|
||||
|
||||
@@ -204,6 +204,8 @@ impl PumpSwapEventParser {
|
||||
pool_quote_token_account: accounts[8],
|
||||
protocol_fee_recipient: accounts[9],
|
||||
protocol_fee_recipient_token_account: accounts[10],
|
||||
base_token_program: accounts[11],
|
||||
quote_token_program: accounts[12],
|
||||
coin_creator_vault_ata: accounts.get(17).copied().unwrap_or_default(),
|
||||
coin_creator_vault_authority: accounts.get(18).copied().unwrap_or_default(),
|
||||
..Default::default()
|
||||
@@ -243,6 +245,8 @@ impl PumpSwapEventParser {
|
||||
pool_quote_token_account: accounts[8],
|
||||
protocol_fee_recipient: accounts[9],
|
||||
protocol_fee_recipient_token_account: accounts[10],
|
||||
base_token_program: accounts[11],
|
||||
quote_token_program: accounts[12],
|
||||
coin_creator_vault_ata: accounts.get(17).copied().unwrap_or_default(),
|
||||
coin_creator_vault_authority: accounts.get(18).copied().unwrap_or_default(),
|
||||
..Default::default()
|
||||
|
||||
Reference in New Issue
Block a user