mirror of
https://github.com/chainstacklabs/pumpfun-bonkfun-bot.git
synced 2026-07-27 23:37:45 +00:00
22a0c23450
Mirrors the four learning-examples commits (9b48418,c25e2ed,57ffe8b,ad6d2cc) into the production code paths under src/. Affects only pump_fun; lets_bonk untouched. PumpSwap is not implemented under src/ so the pool-v2 + breaking-fee-recipient pumpswap accounts are out of scope here. Changes ------- src/platforms/pumpfun/address_provider.py - Adds BREAKING_FEE_RECIPIENTS: ClassVar[list[Pubkey]] with the 8 addresses pump.fun published for the 2026-04-28 upgrade. - Adds pick_breaking_fee_recipient() (random.choice across the 8 to spread program-tx throughput per pump.fun's recommendation). - get_buy_instruction_accounts and get_sell_instruction_accounts now expose "breaking_fee_recipient" alongside the existing keys. src/platforms/pumpfun/instruction_builder.py - BC buy ix: appends breaking_fee_recipient (mutable) AFTER bonding_curve_v2 → 18 accounts total (was 17). - BC sell ix: appends breaking_fee_recipient (mutable) AFTER bonding_curve_v2 for both cashback and non-cashback paths → 16 accounts non-cashback / 17 cashback (was 15 / 16). - get_required_accounts_for_{buy,sell} updated to include the new account so priority-fee scraping covers it. src/platforms/pumpfun/event_parser.py - is_mayhem_mode now extracted into TokenInfo on both paths (CreateEvent logs path and create / create_v2 instruction path); previously only is_cashback_coin was carried forward, leaving extreme_fast_mode buys to use the wrong fee_recipient on Mayhem-Mode tokens. src/trading/platform_aware.py - Buy non-extreme path now also refreshes is_cashback_coin from pool_state (was only refreshing is_mayhem_mode). - Sell path now refreshes both flags from curve state before building the sell ix, so a coin that flips cashback after buy still gets the correct 16-vs-17-account layout. Wrapped in try/except so a transient RPC failure logs a warning and falls back to token_info defaults rather than failing the sell outright. Live-validation (mainnet, all four bots/*.yaml configs) ------------------------------------------------------- bot-sniper-2-logs.yaml buy 4GVJJwYtGixSPAQimgUhNYjEUBG6TB9XeQjKxs9EWpw2QfWuq7LHmUivPrsjhESgaPsPJQ9N6CCxECqxm9csqrH9 (18 accts) → sell 2ijgoPgxPmcSX4mFqz1PVkZ3yAvu36vj3Jy1yWZofxrK7jR92j2DWP3tRNy9PmUd1kiTaoYzVsrpGr6286KCnTp7 (16 accts) ✓ bot-sniper-3-blocks.yaml buy 4siRLG7tYk9iHyXAvnp3DH54vQXVEDHmCqZRmFgYhnRB9mVGjhh43ywohKjg8CpWctt5TyCtDkLRTRWT6VDwVyZi → sell 46jShWJ3sfuCP4YgTcpXWZdyqVmw4ULQSTC3Kwvbc9hE2y4yDosBww8Un8anXZpR1Xf96rN9QusV1G92oNcbp1o3 ✓ bot-sniper-1-geyser.yaml buy 4UEZy7LPm7Rxgw22d1bduQHTWHHHYJSpuaoq2iCyPFpnBPGt4C3QUCu9x77vwWugXnyGv4pQQeTbEZEjvyxxiDH2 → sell 21hSHVPKtqse25XybxhdGrpqK1fSxKKeNZGDCD5j568mzRPfyYR1TQs6mAc2moHKT7kaAAfdMC8DPt8VXmu2rviF ✓ bot-sniper-4-pp.yaml buy 4P91y4iPK6y1gPjz65VL6XAcVkT4DbqjHE5vHfX8PLnzqViCy1qZQ44eWiNDUPzoWCejibB7UJPKYAEj4K3Z3c3S ✓ ; sell hit slippage protection (Custom 6003 — program-side, the ix passed deserialization) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>