Commit Graph
100 Commits
Author SHA1 Message Date
Anton SauchykandClaude Opus 4.7 2ece1c9a2d fix(trading): refresh creator_vault from on-chain BC state before sell
Post-2026-04-28, BC.creator can be delegated to a PFEE-program-owned PDA
after the initial creator buy. The create-time creator_vault cached on
TokenInfo goes stale before the sell lands, producing ConstraintSeeds
(0x7d6) on the Sell instruction.

The sell flow already re-fetches pool_state to refresh is_mayhem_mode and
is_cashback_coin; extend it to also refresh token_info.creator and re-derive
creator_vault from the current BC.creator.

Mainnet validation: geyser listener buy+sell on BEE — buy 2TSqZHZh…k7uN,
sell 3TevcP5g…f8nQ, err=None on both.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 18:51:56 +02:00
Anton SauchykandClaude Opus 4.7 d0dea6d4ac fix(blocks-listener): skip failed txs + use CreateEvent log for canonical creator
Two bugs found by mainnet validation post-2026-04-28 cutover:

1. Blocks listener processed failed txs, including failed create_v2s. The
   bot then tried to buy a non-existent mint (InvalidMint at ATA creation).
   Fix: filter `meta.err is not None` in _process_block_transactions.

2. Blocks listener parsed `args.creator` from the create_v2 ix payload to
   derive creator_vault. Post-cutover, BC.creator is sometimes set to a
   PFEE-program-owned PDA distinct from args.creator (e.g., Companions:
   args.creator=DdZG8dw, BC.creator=3hPZm9). The Anchor seeds constraint
   on creator_vault then fails with ConstraintSeeds (0x7d6). Fix: in
   parse_token_creation_from_block, prefer parsing the CreateEvent log
   (which carries the canonical creator the program wrote to BC.creator)
   over args.creator from the ix payload.

Mainnet validation:
- buy 2uBrNqqW…bPDG, sell 32EKJjrK…9fXv on PUMP (Pumpcoin), err=None.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 18:44:42 +02:00
Anton SauchykandClaude Opus 4.7 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 SauchykandClaude Opus 4.7 ad6d2cc755 fix(examples): add pool-v2 account to pumpswap, repair geyser listener
PumpSwap (manual_buy_pumpswap.py / manual_sell_pumpswap.py)
  - Real on-chain pump-swap buys use 24 accounts; the IDL is incomplete
    (lists 23). Missing 24th account is pool-v2 PDA, derived from seed
    ["pool-v2", base_mint] under the pump-amm program.
  - Without it, pump-amm throws AnchorError 6023 (Overflow) at buy.rs:400/414
    after the trade transfers complete (the source of the earlier "pre-existing
    overflow" — was actually a missing account, not a math bug).
  - find_pool_v2(base_mint) added; appended to both buy and sell account lists
    after fee_program. The April-28 breaking-fee accounts (still gated behind
    INCLUDE_BREAKING_FEE_ACCOUNTS) come after pool-v2 — matching the doc's
    "All accounts till bonding-curve-v2 and pool-v2 remain the same."
  - AsyncClient timeout bumped to 120s so the heavy getProgramAccounts pool
    lookup doesn't time out on slower RPC paths.
  - Live-verified on mainnet with 9PwadsGz...pump:
      buy   2xgdJJsDMzoMyxJzrCATKwGfpX7M... err=None (24 accounts)
      sell  4vdBkGpCMQYEWncj5k1suGzKPUMQ... err=None (24 accounts)

manual_buy_geyser.py
  - Fixes IndexError when create tx references ALT-loaded keys
    (matches the same fix applied to manual_buy.py).
  - Re-enables the 15s sleep + on-chain price/fee_recipient lookup that
    were commented out for testing — needed for buys on real pools.
  - Live-verified: 45wSgX2Pu1LLZWLgu3e9qdhRaGJjqwMqQP5HdeV7zMBqNXziB2uEgxQd5bAqvAhBLFnAqzbuK3LAWowhxZxdemJ
    (18-account buy, err=None) on Token-2022 cashback-enabled INSIDER mint.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 18:35:13 +02:00
Anton SauchykandClaude Opus 4.7 57ffe8bfbb feat(examples): apply 18-account buy upgrade to mint_and_buy + pumpswap
Extends the 2026-04-28 program-upgrade prep (commit c25e2ed) to the
remaining trade scripts:
  mint_and_buy.py              — 18-account buy after bonding-curve-v2.
                                 Tested live with a fresh TEST mint (Solscan
                                 sig 62EZFCKVuxvqmzj...), succeeded.
  mint_and_buy_v2.py           — 18-account buy. Tested live with a
                                 mayhem-mode TEST2 token (Token-2022 + 5
                                 mayhem accounts), Solscan sig 44SvQSrhmHy...,
                                 succeeded.
  pumpswap/manual_buy_pumpswap.py / manual_sell_pumpswap.py
                               — Adds the 2 new pump-swap accounts (fee
                                 recipient + its quote-mint ATA) gated behind
                                 INCLUDE_BREAKING_FEE_ACCOUNTS = False; flip
                                 to True after 2026-04-28 16:00 UTC.
                                 Pre-existing program-side overflow at
                                 buy.rs:400 (AnchorError 6023) flagged in
                                 a comment — affects current pump-swap
                                 buys, unrelated to this upgrade.

Both pumpswap scripts now also accept TOKEN_MINT via argv[1].

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 18:09:14 +02:00
Anton SauchykandClaude Opus 4.7 c25e2edb57 feat(examples): add 18-account buy / 16-17-account sell for 2026-04-28 upgrade
pump.fun program upgrade scheduled for 2026-04-28 16:00 UTC adds one new
mutable account (one of 8 fee recipients) at the end of buy/sell ixs,
after bonding-curve-v2. The new format is already accepted on mainnet
ahead of the cutover, so applying now keeps scripts working on both
sides of the upgrade.

Doc: github.com/pump-fun/pump-public-docs/blob/main/docs/BREAKING_FEE_RECIPIENT.md

Per file:
  manual_buy.py            — 18-account buy. Also fixes a pre-existing
                             listener crash on Address-Lookup-Table create
                             txs (skips them) and adds bool/OptionBool
                             handling to decode_create_instruction so
                             create_v2 doesn't raise on its trailing args.
  manual_buy_cu_optimized.py — 18-account buy. Bumps the CU-optimization
                             account-data limit to 16MB (tested) — older
                             values trigger MaxLoadedAccountsDataSizeExceeded
                             on Token-2022/cashback coins. Same listener
                             ALT-skip and decoder bool fixes.
  manual_buy_geyser.py     — 18-account buy. Re-enables price calculation
                             and mayhem-mode-aware fee_recipient detection
                             (was scaffolded out for testing).
  manual_sell.py           — 16-account non-cashback / 17-account cashback
                             sell. Reads is_cashback_coin from BC byte 82
                             and inserts user_volume_accumulator before
                             bonding-curve-v2 when needed. TOKEN_MINT now
                             accepts argv[1] override.

Live-verified on mainnet:
  buy   manual_buy.py             3AVnLC3sdBD598cs3... + 3bWU9bB8U9aemA2BFhS2...
  buy   manual_buy_cu_optimized   2PfH5rHw62o3KkQ3N4z8...
  sell  manual_sell.py            3E7dyPBPBRe95BtPQXmb... + 5L4wWSzPV36m6XqXAswB...
All four show the expected 18 (buy) / 16 (sell non-cashback) account count
with one of the 8 BREAKING_FEE_RECIPIENTS as the trailing mutable account.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 17:43:31 +02:00
Anton SauchykandClaude Opus 4.7 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 SauchykandClaude Opus 4.7 156cf508a0 chore(idl): refresh pump.fun IDLs from upstream
Replace idl/pump_fun_idl.json and idl/pump_fees.json with the latest from
pump-fun/pump-public-docs @ 7de0b95 (2026-04-23). pump_swap_idl.json was
already up to date.

Drops the idl/upstream/ vendor copy added in 7864504 in favor of
overwriting in place — the diff lives in git history. README updated to
point at pump-public-docs as the source of truth.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 16:14:46 +02:00
Anton SauchykandClaude Opus 4.7 7864504c84 docs(idl): vendor upstream pump.fun IDLs for reference
Snapshot of pump-fun/pump-public-docs @ 7de0b95 (2026-04-23) under
idl/upstream/ — pump.json, pump_amm.json, pump_fees.json and their .ts
counterparts. Used for local diffing against the IDLs the bot loads from
idl/; not imported at runtime. README links to the new directory.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 16:11:19 +02:00
smypmsa 02692793a9 docs: add cli and skill links 2026-03-20 18:56:23 +00:00
smypmsaandClaude Sonnet 4.6 73fe95efe4 docs: mention OpenClaw in pumpclaw ecosystem note
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 18:52:56 +00:00
smypmsaandClaude Sonnet 4.6 f8eb5eb8a0 docs: add ecosystem links to pumpfun-cli and pumpclaw
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 18:51:54 +00:00
smypmsa ec6d58665d docs(examples): update comments for cu optimization in manual buy script 2025-10-27 22:06:40 +00:00
smypmsa 3f20649d0e fix(examples): clarify cu optimized buy script 2025-10-27 22:01:13 +00:00
smypmsa 3fb0a9a549 feat(examples): listen and parse wallet txs 2025-09-23 20:27:22 +00:00
smypmsa 9731b179cc feat(core): add configurable cu limits 2025-09-03 15:05:12 +00:00
smypmsa e1e15dd539 feat(pumpfun): add fee_config and fee_program, close #132 2025-08-29 15:21:36 +00:00
smypmsa bdb5da4a1f feat: update pump idls 2025-08-29 14:50:52 +00:00
smypmsa eefd15a6b7 fix(examples): module path 2025-08-14 16:56:41 +00:00
smypmsa 0dc7c28499 feat(examples): add bonding curve geyser-buy example 2025-08-14 16:44:19 +00:00
smypmsa 0eb8811d78 chore(examples): remove hardcoded token mints 2025-08-14 10:00:19 +00:00
smypmsa f8e0414ee7 fix(core): handle block listener errors 2025-08-14 09:49:01 +00:00
smypmsa f061a75498 feat: updated IDL from pump fun (volume accumulators) 2025-08-14 08:11:24 +00:00
smypmsa 7f544e93f9 docs: add rules for cursor, kiro, windsurf 2025-08-11 05:50:45 +00:00
smypmsa 8ab8932168 docs(claude): add claude code rules 2025-08-11 05:35:25 +00:00
smypmsa cb5c9ed1cd chore: pumpportal time based config example 2025-08-05 20:48:03 +00:00
smypmsa a9c58faf9e fix(pump): derive associated bonding curve 2025-08-05 20:30:41 +00:00
smypmsa 329266611c fix(core): minor fixes in hardcoded values 2025-08-05 20:19:00 +00:00
smypmsa 874d148777 fix(core): use logger exception 2025-08-05 16:09:05 +00:00
smypmsa 83a7f9e4ad docs(readme): add letsbonk, update commands 2025-08-05 15:18:22 +00:00
smypmsa 53763b7123 fix(core): remove unused args, improve logging 2025-08-05 14:56:59 +00:00
smypmsa 7e644286a8 fix(core): remove redundant kwargs 2025-08-05 14:53:53 +00:00
smypmsa 2c2306e80b fix(core): add missing method to event parser interface 2025-08-05 14:53:07 +00:00
smypmsa 3e82cfa128 fix(core): replace os with pathlib 2025-08-05 14:51:48 +00:00
smypmsa 80b03748b0 fix(core): refactor dataclass to use class vars 2025-08-05 14:44:06 +00:00
smypmsa a831cafaf4 fix(core) import level 2025-08-05 14:41:36 +00:00
smypmsa 49c5085764 fix(core): remove silent failures 2025-08-05 14:40:43 +00:00
smypmsa ea1d6b469a feat(core): pump portal fully integrated 2025-08-04 05:40:02 +00:00
smypmsa bf7fbaa8ab chore(core): update example for logs 2025-08-04 05:07:05 +00:00
smypmsa 2c6da58eb7 fix(core): fix event idl parser for logs 2025-08-04 05:02:53 +00:00
smypmsa 9b6563cecc feat(core): add event idl parser 2025-08-02 19:19:20 +00:00
smypmsa bae03c3fab fix(core): block event processor account keys bytes 2025-08-02 16:41:23 +00:00
smypmsa 26c048c86a fix(core): platform listener check 2025-08-02 16:12:45 +00:00
smypmsa e7107751f5 fix(letsbonk): buy/sell instructions 2025-08-02 15:38:53 +00:00
smypmsa 72a3d23e6b chore: remove redundant tests 2025-08-02 15:12:49 +00:00
smypmsa 93332794a3 feat(pump): integrate idl parser manager 2025-08-02 15:10:24 +00:00
smypmsa 9a09862f0d feat(letsbonk): add idl manager 2025-08-02 14:52:40 +00:00
smypmsa 1ddadcd0af feat(letsbonk): integrate idl parser 2025-08-02 14:38:54 +00:00
smypmsa 4acabfb1af wip(letsbonk): idl parser in parser, builder 2025-08-02 14:33:44 +00:00
smypmsa f92f68fc41 wip(core): dynamic idl parser 2025-08-02 14:21:16 +00:00
smypmsa 04342fee5a fix(pump): fix curve management 2025-08-02 14:17:29 +00:00
smypmsa 8ee6b95d2d feat(core): cleanup address management system 2025-08-02 14:03:41 +00:00
smypmsa 227ef0b3bd wip(core): platform aware trading 2025-08-02 13:27:07 +00:00
smypmsa 9ec9eeb793 wip(core): platform aware trading 2025-08-02 11:30:30 +00:00
smypmsa bb35101a8f wip(core): platform aware trading 2025-08-02 09:25:39 +00:00
smypmsa 60c452da0f fix(core): increase cu limit 2025-08-01 12:00:17 +00:00
smypmsa 3faeb1338e feat(core): update buy instruction, add volume_accumulator accounts 2025-08-01 05:25:54 +00:00
smypmsa d2f157e7f0 feat(examples): update pump amm buy instruction 2025-08-01 05:11:31 +00:00
smypmsa 4fd3181612 feat(examples): update bonding curve buy instructions 2025-08-01 05:05:55 +00:00
smypmsa 9bfbb7f4eb chore: update pump idl 2025-08-01 04:47:34 +00:00
smypmsa 060a69da6e docs(claude): update uv commands 2025-07-18 12:05:30 +00:00
smypmsa 536a5dd6a5 docs(cursor): add uv rules, formatting 2025-07-18 12:03:00 +00:00
smypmsa a5a92fbf4b docs(curosr): tests rules 2025-07-18 11:37:11 +00:00
smypmsa 359582d0c9 wip(cursor): craft cursor rules 2025-07-15 14:33:17 +00:00
smypmsa 7e30ef627a docs(cursor): fix globs in bots 2025-07-15 14:12:25 +00:00
smypmsa fb2903b013 docs: improve cursor rules (bots) 2025-07-15 14:10:07 +00:00
smypmsa 4383a18f47 docs: add cursor rules 2025-07-14 20:07:50 +00:00
smypmsa 4d9864f936 docs: remove Raydium 2025-07-14 19:58:22 +00:00
smypmsa 51eae4f5a3 docs: add CLAUDE.md 2025-07-14 19:56:46 +00:00
smypmsa feaedfd91f feat(examples): add mint and buy example 2025-06-29 19:21:40 +00:00
smypmsa 66c6bc37ab fix(examples): compare listeners print width 2025-06-29 19:06:15 +00:00
smypmsa ddbe5970a2 fix(examples): remove redunant imports, comments 2025-06-28 09:52:53 +00:00
smypmsa 984f43b757 fix: remove coderabbit syntax bugs 2025-06-15 20:12:54 +00:00
smypmsa 473b1bec70 feat: add simple tp and sl with price polling 2025-06-15 18:20:13 +00:00
smypmsa 185811d854 feat: add pump portal listener 2025-06-15 11:48:31 +00:00
smypmsa 06166dd8fc fix(examples): correct formula for bonding curve progress 2025-05-26 14:19:13 +00:00
smypmsa 9495d250b9 fix(pumpswap): set global config writable false 2025-05-15 13:29:31 +00:00
smypmsa f80e06e180 fix: repair pumpswap buy tx 2025-05-14 15:25:04 +00:00
smypmsa e4675c5284 feat: update rest of scripts with creator fee 2025-05-14 07:22:35 +00:00
smypmsa f811632c3c feat: manual buy and sell with creator fee 2025-05-13 07:38:46 +00:00
smypmsa e41a5f4f4f feat(core): add support for creator fee update 2025-05-12 20:07:51 +00:00
smypmsa d979427662 fix: geyser auth type in tests 2025-05-06 09:50:21 +00:00
smypmsa aa145dc018 feat: add geyser auth type, compare listeners for new tokens 2025-05-06 08:39:13 +00:00
smypmsa a36fab7352 fix: comments, minor fixes 2025-04-29 11:56:55 +00:00
smypmsa 465e804d39 feat: add warming up endpoint, minor optimizations 2025-04-25 09:38:19 +00:00
smypmsa 2ef1a09b8d fix: decrease tx CUs, add explicit commitment level for getLatestBlockhash 2025-04-25 07:33:44 +00:00
smypmsa 40e4a4b130 feat: add support for multiple bots 2025-04-24 20:32:47 +00:00
smypmsa 81c2af4af1 feat: add example of programSubscribe listener for migrations, group examples into subfolders 2025-04-21 11:36:09 +00:00
smypmsa 46e0862b30 fix: load env vars in cli.py 2025-04-15 07:02:37 +00:00
smypmsa 2177bf8c1b feat: add geyser listener support to bot 2025-04-14 20:12:10 +00:00
smypmsa b9e29a8b12 feat: add geyser listener script 2025-04-14 15:02:52 +00:00
smypmsa 6e3b1b3b41 feat: add mint address extraction for graduating tokens 2025-04-13 20:23:58 +00:00
smypmsa 18ee63b2b9 feat: add get graduating tokens script 2025-04-09 11:56:44 +00:00
smypmsa 7cfd89d1ae fix: gracefully cancel blockhash updater task 2025-04-04 21:38:36 +00:00
smypmsa 9b9a86a506 feat: add blockhash caching 2025-04-04 21:31:00 +00:00
smypmsa 4eacc5a4f7 feat: add EXTREME FAST mode for token buying 2025-04-03 21:57:36 +00:00
smypmsa ddb331f9e9 feat: use idempotent ata instr, merge burn and close instr 2025-04-03 14:49:01 +00:00
smypmsa 68c8251ccf feat: add track bonding curve progress script 2025-04-02 15:36:58 +00:00
smypmsa c5a0258aa7 fix: use base64 explicitly 2025-04-01 14:57:01 +00:00
smypmsa 1064247e6d chore: comments on base64 encoding 2025-04-01 14:37:13 +00:00