Commit Graph
77 Commits
Author SHA1 Message Date
546b94af6f fix(examples): add bonding_curve_v2 to learning examples (#160)
* fix(examples): add bonding_curve_v2 remaining account to learning examples

Add the required bonding_curve_v2 PDA as a remaining account to buy/sell
instructions in manual_buy, manual_sell, mint_and_buy, and mint_and_buy_v2
learning examples, matching the pump.fun program upgrade.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(examples): add bonding_curve_v2 to manual_buy_geyser and manual_buy_cu_optimized

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 23:54:18 +01:00
4a48f545c1 feat(pumpfun): update IDLs and add bonding_curve_v2 + cashback support (#159)
Update all 3 pump.fun IDL files (pump_fun, pump_swap, pump_fees) with
new cashback rewards and fee-sharing features. Fix IDL parser to handle
tuple struct types (OptionBool). Add bonding_curve_v2 remaining account
to all buy/sell instructions as required by the pump.fun program upgrade.

Key changes:
- Fix IDL parser crash on tuple struct fields (string vs dict)
- Add bonding_curve_v2 PDA derivation and append as remaining account
- Add is_cashback_coin field to TokenInfo and BondingCurve decoding
- Propagate is_cashback_enabled from CreateEvent/create_v2 to TokenInfo
- Conditionally include user_volume_accumulator for cashback sell txs

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 23:39:52 +01:00
0b6779ca34 Fix buy/sell transactions silently failing on-chain (#157)
* fix(core): disable account_data_size limit and add meta.err checking

The 12.5MB setLoadedAccountsDataSizeLimit was causing all buy transactions
to fail with MaxLoadedAccountsDataSizeExceeded since pump.fun migrated to
Token-2022. Transactions landed on-chain (fees paid) but inner instructions
were rejected — the bot paid gas for nothing.

Changes:
- Disable account_data_size in all bot configs (Token-2022 needs >12.5MB)
- Add meta.err check in get_buy_transaction_details() for clear error
  reporting when transactions fail on-chain
- Include tx signature in platform_aware.py error messages for debugging

Tested: full buy→sell→cleanup cycle works on pump_fun with geyser listener.


* fix(core): check meta.err in confirm_transaction to detect failed txs

Solana transactions can be "confirmed" (included in a block) but still
fail execution if inner program instructions are rejected. Previously,
confirm_transaction only checked that the tx landed on-chain, causing
silent failures in buy, sell, and cleanup operations.

Now fetches the transaction result after confirmation and checks
meta.err, returning False when the transaction failed. This fixes
the ATA cleanup issue where sells were silently failing with
Custom: 6003 errors, leaving non-zero token balances.


* fix(core): treat failed tx fetch as unconfirmed in confirm_transaction

When _get_transaction_result returns None (RPC failure, timeout, etc.),
the function was falling through to return True — silently treating an
unknown state as success. Now returns False with a warning log.

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 10:37:04 +01:00
31955103dc feat: add Windows compatibility for uvloop dependency (#155)
Fixes chainstacklabs/pumpfun-bonkfun-bot#152

Changes:
- Make uvloop optional with platform-specific markers (Unix only)
- Add winloop as Windows alternative for performance optimization
- Update code to gracefully fall back to standard asyncio when event loop
  libraries are unavailable
- Both bot_runner.py and universal_trader.py now detect platform and use
  appropriate event loop implementation

This resolves the blocking installation issue for Windows users while
maintaining performance benefits on all platforms. Windows users can now
install and run the bot with winloop for improved performance, or use
standard asyncio as fallback.

Related: https://github.com/smypmsa/gh-triage-reports/blob/main/issues/chainstacklabs-pumpfun-bonkfun-bot/issue-152-2026-02-08.md

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-09 16:58:24 +04:00
Anton SauchykandGitHub 9d93d859a8 Reduce RPC delays when selling (#150)
* feat(trading): enhance sell execution with token amount and price parameters to reduce RPC delays

* feat(trading): add method to fetch actual token balance after transaction to improve accuracy

* feat(trading): update account data size limit and enhance price calculations
2025-11-23 12:02:29 +01:00
Anton SauchykandGitHub 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 SauchykandGitHub 7ae8b560bd feat(pumpswap): update pool account to writable for buy/sell instructions (#146) 2025-11-04 17:06:22 +01:00
Anton SauchykandGitHub 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
AntonandGitHub 8367611ed7 feat(example): add pump buy script with compute unit optimization (#143) 2025-10-27 00:21:56 +01:00
AntonandGitHub 68cac87aad Fix/update letsbonk fun instructions in the bot (#142)
* feat(core): support multiple initialize instruction variants in LetsBonkEventParser

* feat(core): add creator and platform fee vault derivation methods and update account handling in buy/sell instructions

* feat(letsbonk): add global_config and platform_config to TokenInfo and update address provider logic
2025-10-26 16:21:58 +01:00
AntonandGitHub 7377e1757e docs: add info about geyser plugin 2025-10-26 14:27:35 +01:00
AntonandGitHub 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
AntonandGitHub 25c376dd02 Feat/letsbonk examples (#140)
* feat: update letsbonk idl

* feat: add letsbonk examples
2025-10-22 00:20:30 +02:00
AntonandGitHub e97e2f2d35 Merge pull request #135 from BSmick6/fix/add-build-system
build: Add build-system to install project scripts
2025-10-04 14:42:03 +02:00
AntonandGitHub ecb6a515b1 Merge pull request #129 from chainstacklabs/add-agents-md
Add AGENTS.md
2025-08-21 12:04:41 +00:00
AntonandGitHub 093331874b docs(readme): tiny typo 2025-08-11 08:55:13 +02:00
AntonandGitHub 3aae6106e2 Merge pull request #124 from chainstacklabs/feat/upd-buy-instr
Add global_volume_accumulator and user_volume_accumulator to buy instructions (bonding curve, amm)
2025-08-01 05:33:16 +00:00
AntonandGitHub 4c3089b70f docs: clarify installation steps 2025-07-14 21:21:04 +02:00
AntonandGitHub b10643a744 Merge pull request #120 from vedthemaster/fix/pumpswap-program-error
fix(examples): wrapping the SOL before pumpswap buy
2025-07-04 06:43:28 +02:00
AntonandGitHub 48ed52ab49 Merge pull request #119 from yanCode/chore/gitignore.DS_Store
chore: add .DS_store to .gitignore
2025-07-02 11:20:58 +02:00
AntonandGitHub 327145a985 Merge pull request #118 from Bukhtiiarovv/main
chore: update generated protobuf files
2025-06-30 14:28:41 +02:00
AntonandGitHub 277f52987a docs: mint feature done 2025-06-29 21:35:08 +02:00
AntonandGitHub 61fab53d47 Merge pull request #117 from chainstacklabs/feat/mint-n-buy-example
Add mint and buy example
2025-06-29 21:31:19 +02:00
AntonandGitHub f69dfce484 Merge pull request #116 from yanCode/fix/retries
[Refactor] manual_buy.py & manual_sell.py
2025-06-27 23:46:52 +02:00
AntonandGitHub d493d6668b docs: mark exist strategies done 2025-06-17 15:14:05 +02:00
AntonGitHubcoderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2ad0f37912 Update src/trading/buyer.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-06-15 21:28:23 +02:00
AntonGitHubcoderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
ec1c3afae4 Update src/trading/buyer.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-06-15 21:28:03 +02:00
AntonGitHubcoderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
8f8fa2a526 Update src/trading/position.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-06-15 20:50:38 +02:00
AntonGitHubcoderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
578c24b17f Update src/trading/buyer.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-06-15 20:49:40 +02:00
AntonGitHubcoderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
4bb6b6ae99 Update src/monitoring/pumpportal_listener.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-06-15 20:48:32 +02:00
AntonandGitHub 2153bfd441 Merge pull request #108 from yanCode/fix/creator-parse
fix(learning examples): use STRUCT_2 to parse creator
2025-06-09 09:03:10 +02:00
AntonandGitHub 211031b5e3 Merge pull request #100 from chainstacklabs/feat/learning-examples-creator-fee
Add/update buy and sell transaction for PumpSwap
2025-05-14 15:39:02 +00:00
AntonandGitHub 44e2c83120 fix: remove duplicated function 2025-05-14 17:36:23 +02:00
AntonGitHubcoderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
957722ba73 Update learning-examples/decode_from_getAccountInfo.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-05-14 17:33:17 +02:00
AntonandGitHub 1e34b5b9e9 Merge pull request #98 from chainstacklabs/feat/pump-fun-update-creator-fee
Add support for Pump Fun creator fee upgrade
2025-05-13 06:22:06 +00:00
AntonandGitHub 6e908b8656 Merge pull request #96 from chainstacklabs/refactored/main-v2
Fix Geyser authentication type in tests
2025-05-06 09:53:14 +00:00
AntonandGitHub cc5b768e6d docs: update README.md 2025-05-06 11:30:46 +02:00
AntonandGitHub ebbc399e0b docs: update README.md 2025-05-06 11:07:24 +02:00
AntonandGitHub a21ac60be7 Merge pull request #95 from chainstacklabs/refactored/main-v2
Add Geyser authentication type, compare listeners for new tokens script (learning example)
2025-05-06 08:53:11 +00:00
AntonGitHubcoderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
fe17df2670 fix: update src/monitoring/geyser_listener.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-05-06 10:52:07 +02:00
AntonandGitHub 83b1db2b42 docs: refactored code merged into main 2025-04-30 13:55:38 +02:00
AntonandGitHub 157f833fb4 Merge pull request #94 from chainstacklabs/refactored/main-v2
Promoting refactored bot to the main branch
2025-04-30 11:51:09 +00:00
AntonandGitHub 9a26aa7532 docs: add license 2025-04-30 13:38:32 +02:00
AntonandGitHub 2338b81e94 Merge pull request #91 from chainstacklabs/feat/multi-bot-system
Add support for multiple instances of bots
2025-04-25 06:18:48 +00:00
AntonandGitHub 2aac2f8f64 Merge pull request #89 from chainstacklabs/feat/ps-migration-listener-and-other
Add programSubscribe listener for migrations and other (learning example)
2025-04-22 06:59:52 +00:00
AntonandGitHub eacb2554da docs: Geyser listener completed 2025-04-15 09:06:19 +02:00
AntonandGitHub 188f43f4cd docs: Geyser listener completed 2025-04-15 09:05:31 +02:00
AntonandGitHub 6345afe1bf Merge pull request #86 from chainstacklabs/feat/geyser-listener-for-bot
Add Geyser listener support to bot
2025-04-15 06:52:43 +00:00
AntonandGitHub dfb0f8b273 Merge pull request #85 from chainstacklabs/feat/geyser-listener-script
Add Geyser listener for token creation transactions (learning example)
2025-04-15 06:52:14 +00:00
AntonandGitHub f64ca29bd8 Merge pull request #84 from chainstacklabs/feat/get-graduating-mint-address-script
Add mint address extraction for soon-to-gradute tokens (learning example)
2025-04-14 06:45:35 +00:00
AntonandGitHub a113ac82b4 Merge pull request #83 from chainstacklabs/feat/get-graduating-tokens-script
Filter soon-to-graduate tokens (learning example)
2025-04-10 06:32:20 +00:00
AntonandGitHub d9c1733406 Merge pull request #80 from chainstacklabs/feat/recent-blockhash-caching
Add recent blockhash caching
2025-04-05 09:01:04 +00:00
AntonandGitHub 8520452060 Merge pull request #79 from chainstacklabs/feat/extreme-fast-mode
Add EXTREME FAST mode for token buying (without waiting for bonding curve)
2025-04-04 04:30:39 +00:00
AntonandGitHub 912ab86296 Merge pull request #77 from chainstacklabs/feature/idempotent-ata-and-merge-burn-close
Optimize token handling: idempotent ATA for buying and combined burn & close instructions
2025-04-04 04:30:10 +00:00
AntonandGitHub d662b126b9 Merge pull request #76 from chainstacklabs/feat/track-bonding-curve-progress-script
Track bonding curve progress (learning example)
2025-04-03 06:12:00 +00:00
AntonandGitHub 5e0e587ca0 docs: done reviewing base64 2025-04-02 22:44:17 +02:00
AntonandGitHub 62102ddbb7 docs: done reviewing base64 2025-04-02 22:43:16 +02:00
AntonandGitHub 54f3bd4b0e Merge pull request #75 from chainstacklabs/feat/pumpswap-sell-script
Sell tokens on PumpSwap script (learning example)
2025-04-01 08:13:49 +00:00
AntonandGitHub 6c23dba5f4 docs: migration listening done 2025-03-31 10:39:01 +02:00
AntonandGitHub 355cd6bdb1 docs: add review & optimize json, jsonParsed, base64 2025-03-31 10:37:45 +02:00
AntonandGitHub 4b224879dd docs: migration listening done 2025-03-31 10:27:47 +02:00
AntonandGitHub 5b9d8595a8 Merge pull request #74 from chainstacklabs/feat/get-pumpswap-pools-script
Get PumpSwap market data (learning example)
2025-03-31 07:00:29 +00:00
AntonandGitHub fca7da81f5 Merge pull request #73 from chainstacklabs/feature/listen-to-migrations-script
Listen to migrations script (learning example)
2025-03-29 23:05:19 +00:00
AntonandGitHub 72ac4c526f docs: ATA closing done 2025-03-28 19:03:30 +01:00
AntonandGitHub 1f55adeeea docs: ATA closing done 2025-03-28 09:30:16 +01:00
AntonandGitHub ddb1849d10 Merge pull request #71 from chainstacklabs/feature/cleanup-ata-support
Integrate ATA closing into trader
2025-03-28 08:29:13 +00:00
AntonandGitHub 2db8b2ec50 Merge pull request #69 from chainstacklabs/feature/close-ata-script
Close ATA script for token cleanup (learning example)
2025-03-26 07:37:22 +00:00
AntonandGitHub 1b9c3c5b4b docs: sync readme with main 2025-03-25 14:39:31 +01:00
AntonandGitHub 6544e4bd36 Update README.md 2025-03-21 15:23:05 +01:00
AntonandGitHub e6236a9a86 docs: update README.md 2025-03-19 08:13:07 +01:00
AntonandGitHub 4039ec3707 Merge pull request #65 from chainstacklabs/feature/logs-subscribe
Add logsSubscribe listener
2025-03-19 07:11:12 +00:00
AntonandGitHub 669f8e8807 docs: minor fix in readme 2025-03-17 17:29:00 +01:00
AntonandGitHub d3985d6bde docs: added uv instructions 2025-03-17 17:27:43 +01:00
AntonandGitHub 396e9bce1d docs: update README.md 2025-03-15 09:23:15 +01:00
AntonandGitHub ffe81463d7 Merge pull request #64 from chainstacklabs/feature/dynamic-prior-fees
Add dynamic/fixed priority fee
2025-03-15 08:22:12 +00:00
AntonandGitHub 071f9c9280 chore: delete .vscode directory 2025-03-12 20:44:56 +01:00
AntonandGitHub 4c4b9a270b updated readme 2025-03-07 22:11:21 +01:00