Pumpfun how to detect mayhem tokens
Pumpfun how to detect mayhem tokens
Loading saved threads...
Dominik Lechner · External communityPost link
External question — Solana Stack Exchange
Author: Dominik Lechner
Original post: https://solana.stackexchange.com/questions/24305
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
Does anybody know how to detect mayhem tokens on pumpfun with the logsubscribe method. When a new coin is created you can see it in the logs and then theres a discriminator with some data to decode. But I can't seem to find the mayhem bool byte. Because when you try to snipe a coin and then you have to fetch the bondingcurve data with getaccountinfo you miss a lot of time.
Quote
Report
Jimii · External communityPost link
External answer — Solana Stack Exchange
Author: Jimii
Original post: https://solana.stackexchange.com/a/24306
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
The BondingCurve account contains a field,
is_mayhem_mode
which is a bool if set to true means that they have it enabled
ref:
https://github.com/pump-fun/pump-public-docs/blob/9d874ec2763ac60f510d2bba80c5126c1fe133a8/idl/pump.json#L6002-L6005
use anchor_lang::AccountDeserialize;
#[derive(AccountDeserialize)]
pub struct BondingCurve {
pub virtual_token_reserves: u64,
pub virtual_sol_reserves: u64,
pub real_token_reserves: u64,
pub real_sol_reserves: u64,
pub token_total_supply: u64,
pub complete: bool,
pub creator: Pubkey,
pub is_mayhem_mode: bool,
pub is_cashback_coin: bool,
}
let mut data: &[u8] = &account.data;
let bc = BondingCurve::try_deserialize(&mut data)?;
let is_mayhem = bc.is_mayhem_mode;
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External answer — Solana Stack Exchange Author: Jimii Source score (net votes, not local likes): 0 Original post: https://solana.stackexchange.com/a/24306 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. The BondingCurve account contains a field, is_mayhem_mode which is a bool if set to true means that they have it enabled ref: https://github.com/pump-fun/pump-public-docs/blob/9d874ec2763ac60f510d2bba80c5126c1fe133a8/idl/pump.json#L6002-L6005 use anchor_lang::AccountDeserialize; #[derive(AccountDeserialize)] pub struct BondingCurve { pub virtual_token_reserves: u64, pub virtual_sol_reserves: u64, pub real_token_reserves: u64, pub real_sol_reserves: u64, pub token_total_supply: u64, pub complete: bool, pub creator: Pubkey, pub is_mayhem_mode: bool, pub is_cashback_coin: bool, } let mut data: &[u8] = &account.data; let bc = BondingCurve::try_deserialize(&mut data)?; let is_mayhem = bc.is_mayhem_mode;
Checking account access…