11 Commits

Author SHA1 Message Date
Anton Sauchyk bda9099275 chore(examples): accept argv override and bump RPC timeouts
Three small ergonomic fixes uncovered while running every learning
example end-to-end:

  copytrading/listen_wallet_transactions.py
    Was hardcoded to WALLET_TO_TRACK = "...". Now accepts argv[1] so
    you can run it without editing the file.

  pumpswap/get_pumpswap_pools.py
    Same pattern (TOKEN_MINT placeholder) and the underlying
    getProgramAccounts call would also time out at the default 30s
    on busy mainnet RPCs — bumped both AsyncClient timeouts to 120s.

  bonding-curve-progress/get_graduating_tokens.py
    Bumped RPC timeout 120s → 240s for the same reason. The threshold
    scan over all pump.fun bonding curves still occasionally exceeds
    even that on overloaded RPCs (it's a known-heavy query); a smaller
    threshold or memcmp-narrowed filter is the proper long-term fix.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 19:52:41 +02:00
Anton Sauchyk 9b4841890c fix(examples): align listeners and decoders with refreshed pump.fun IDL
Refreshes the read-only learning examples (Phase A3) against the post
Feb–Apr 2026 IDL changes:
  - CreateEvent now has 15 fields (timestamp, 4×u64 reserves, token_program,
    is_mayhem_mode, is_cashback_enabled). Listener parsers were truncating
    after `creator`; the v2 ones were also reading is_mayhem_mode at the
    wrong offset.
  - BondingCurve account is now 83 bytes (added is_cashback_coin).
  - PumpSwap Pool account is now 245 bytes (added is_cashback_coin) — the
    listen_programsubscribe dataSize filter was matching nothing.
  - IDL instruction `createV2` was renamed to `create_v2`; the legacy
    `create` instruction added a `creator: pubkey` arg in March 2026.
  - decode_from_blockSubscribe.py decoder now handles bool, i64, u32, u16,
    u8, and the OptionBool defined type (1-byte wire format).

Files touched (all under learning-examples/):
  bonding-curve-progress/get_bonding_curve_status.py  — V4 struct (cashback)
  bonding-curve-progress/poll_bonding_curve_progress.py
  decode_from_blockSubscribe.py
  decode_from_getAccountInfo.py
  decode_from_getTransaction.py
  listen-migrations/compare_migration_listeners.py
  listen-migrations/listen_programsubscribe.py
  listen-new-tokens/compare_listeners.py
  listen-new-tokens/listen_blocksubscribe.py
  listen-new-tokens/listen_geyser.py
  listen-new-tokens/listen_logsubscribe.py
  listen-new-tokens/listen_logsubscribe_abc.py

Verified live against mainnet — listeners decode tokens including
mayhem-mode and cashback-enabled curves correctly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 16:42:11 +02:00
Anton Sauchyk 03a4e7bcbc Add mayhem mode support and Token2022 integration (#149)
* feat: mayhem update in idl

* feat(examples): update bonding curve scripts

* feat(example): update listen_blocksubscribe

* feat(examples): update geyser listener

* feat(examples): update all new token listeners

* feat(examples): add comments, fix printing, formatting

* feat(examples): pumpswap buy and sell update with mayhem mode

* fix(examples): sell pump amm fee recipient

* feat(examples): update decode scripts

* feat(examples): update fetch price

* feat(examples): buy and sell bonding curve scripts

* feat(examples): add mint with mayhem mode enabled

* feat(examples): improve listening to wallet txs

* feat(examples): migration listener improvements

* feat(examples): global vol accumulator is not writable

* feat(examples): support token/token2022 programs in buy instructions

* feat(examples): token/token2022 for pumpswap buy

* feat(examples): token/token2022 supprot for sell instructions

* feat(bot): support create_v2 with token2022, mayhem mode, other fixes

* fix(bot): support only token2022 in logs and pumportal listeners

* feat(bot): token2022 support in cleanup flow

* fix(bot): update token program handling and improve price validation in trading logic

* feat(bot): enhance token program handling for LetsBonk integration
2025-11-18 13:09:37 +01:00
Anton Sauchyk b6928d1f5f feat(core): integrate account data size limit (#144)
* feat(core): integrate account data size limit in buyer and seller transaction

* refactor: format code for improved readability and consistency
2025-10-28 21:21:21 +01:00
Anton d64b51da44 fix(examples): mint and buy script (#141)
* fix(examples): remove hardcoded token mints

* feat(core): update pump idls

* feat(examples): add track volume bool to mint script

* feat(examples): add extend acc instr to mint
2025-10-25 15:01:04 +02:00
smypmsa 8ab8932168 docs(claude): add claude code rules 2025-08-11 05:35:25 +00:00
smypmsa 83a7f9e4ad docs(readme): add letsbonk, update commands 2025-08-05 15:18:22 +00:00
Zhang ShengYan 00216972bf fix:use STRUCT_2 to parse creator 2025-06-08 19:53:30 +08:00
smypmsa 06166dd8fc fix(examples): correct formula for bonding curve progress 2025-05-26 14:19:13 +00:00
smypmsa e4675c5284 feat: update rest of scripts with creator fee 2025-05-14 07:22:35 +00:00
smypmsa 81c2af4af1 feat: add example of programSubscribe listener for migrations, group examples into subfolders 2025-04-21 11:36:09 +00:00