feat: add support for pump mayhem mode

This commit is contained in:
ysq
2025-11-10 15:30:24 +08:00
parent 4f315187f3
commit 4cee5e6a06
15 changed files with 180 additions and 68 deletions
+1
View File
@@ -148,6 +148,7 @@ async fn pumpfun_copy_trade_with_grpc(trade_info: PumpFunTradeEvent) -> AnyResul
trade_info.real_token_reserves,
trade_info.real_sol_reserves,
None,
trade_info.fee_recipient,
)),
address_lookup_table_account: address_lookup_table_account,
wait_transaction_confirmed: true,
+1
View File
@@ -148,6 +148,7 @@ async fn pumpfun_copy_trade_with_grpc(trade_info: PumpFunTradeEvent) -> AnyResul
trade_info.real_token_reserves,
trade_info.real_sol_reserves,
None,
trade_info.fee_recipient,
)),
address_lookup_table_account: None,
wait_transaction_confirmed: true,
@@ -144,6 +144,7 @@ async fn pumpfun_copy_trade_with_grpc(trade_info: PumpFunTradeEvent) -> AnyResul
trade_info.real_token_reserves,
trade_info.real_sol_reserves,
None,
trade_info.fee_recipient,
)),
address_lookup_table_account: None,
wait_transaction_confirmed: true,
@@ -187,6 +188,7 @@ async fn pumpfun_copy_trade_with_grpc(trade_info: PumpFunTradeEvent) -> AnyResul
trade_info.real_token_reserves,
trade_info.real_sol_reserves,
Some(true),
trade_info.fee_recipient,
)),
address_lookup_table_account: None,
wait_transaction_confirmed: true,
@@ -110,6 +110,7 @@ async fn pumpfun_sniper_trade_with_shreds(trade_info: PumpFunTradeEvent) -> AnyR
trade_info.associated_bonding_curve,
trade_info.creator_vault,
None,
trade_info.fee_recipient,
)),
address_lookup_table_account: None,
wait_transaction_confirmed: true,
+7 -3
View File
@@ -46,7 +46,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
PUMPSWAP_PROGRAM_ID.to_string(), // Listen to PumpSwap program ID
];
let account_exclude = vec![];
let account_required = vec![];
// Listen to transaction data
@@ -148,9 +148,11 @@ async fn pumpswap_trade_with_grpc_buy_event(trade_info: PumpSwapBuyEvent) -> Any
trade_info.coin_creator_vault_authority,
trade_info.base_token_program,
trade_info.quote_token_program,
trade_info.protocol_fee_recipient,
);
let mint = if trade_info.base_mint == sol_trade_sdk::constants::USDC_TOKEN_ACCOUNT
|| trade_info.base_mint == sol_trade_sdk::constants::WSOL_TOKEN_ACCOUNT {
|| trade_info.base_mint == sol_trade_sdk::constants::WSOL_TOKEN_ACCOUNT
{
trade_info.quote_mint
} else {
trade_info.base_mint
@@ -172,9 +174,11 @@ async fn pumpswap_trade_with_grpc_sell_event(trade_info: PumpSwapSellEvent) -> A
trade_info.coin_creator_vault_authority,
trade_info.base_token_program,
trade_info.quote_token_program,
trade_info.protocol_fee_recipient,
);
let mint = if trade_info.base_mint == sol_trade_sdk::constants::USDC_TOKEN_ACCOUNT
|| trade_info.base_mint == sol_trade_sdk::constants::WSOL_TOKEN_ACCOUNT {
|| trade_info.base_mint == sol_trade_sdk::constants::WSOL_TOKEN_ACCOUNT
{
trade_info.quote_mint
} else {
trade_info.base_mint