fix(pumpfun): use is_cashback_coin instead of is_mayhem_mode for sell user_volume_accumulator
The Pump.fun IDL explicitly states that user_volume_accumulator is passed as remaining_accounts[0] for cashback coins during sell. Using is_mayhem_mode incorrectly omitted the account for cashback tokens, causing the program to misread bonding_curve_v2 as user_volume_accumulator and resulting in Custom(6024) Overflow.
This commit is contained in:
@@ -328,7 +328,7 @@ fn build_sell_v1(params: &SwapParams) -> Result<Vec<Instruction>> {
|
||||
accounts::FEE_PROGRAM_META,
|
||||
];
|
||||
|
||||
if bonding_curve.is_mayhem_mode {
|
||||
if bonding_curve.is_cashback_coin {
|
||||
metas.push(AccountMeta::new(user_volume_accumulator, false));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user