Skip to content

Conversation

@smypmsa
Copy link
Member

@smypmsa smypmsa commented Nov 4, 2025

#145

Summary by CodeRabbit

  • Updates
    • Pool and market accounts now support write access during swap operations (buy, sell, and exact quote instructions).
    • Volume tracking capability added to buy operations.

@smypmsa smypmsa self-assigned this Nov 4, 2025
@smypmsa smypmsa added the enhancement New feature or request label Nov 4, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 4, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Three instructions in the pump swap IDL now declare the pool account as writable. Corresponding Python example files update account metadata to mark pump market accounts as writable, and the buy instruction adds a track_volume flag to enable volume tracking during swaps.

Changes

Cohort / File(s) Summary
IDL Account Permission Updates
idl/pump_swap_idl.json
Pool account declared as writable in buy, buy_exact_quote_in, and sell instructions
Python Example Updates
learning-examples/pumpswap/manual_buy_pumpswap.py
Pump market account marked writable in buy_pump_swap accounts; track_volume flag added to instruction data
Python Example Updates
learning-examples/pumpswap/manual_sell_pumpswap.py
Pump market (pump_fun_amm_market) account marked writable in sell_pump_swap accounts

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify the impact of making pool/market accounts writable on state mutations during buy/sell operations
  • Confirm track_volume flag implementation aligns with IDL specification
  • Ensure consistency across all three instruction types (buy, buy_exact_quote_in, sell)

Possibly related PRs

  • Fix/mint buy example #141: Also modifies idl/pump_swap_idl.json and updates the same instruction account definitions (buy, buy_exact_quote_in, sell), indicating potential overlapping changes to pool account permissions.

Poem

🐰 The pools now flow with writable grace,
Accounts unlocked to track their pace,
Volume counted, swaps complete—
Our bunny trades make markets neat! 🥕✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/pumpswap-idl-updates

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b6928d1 and 6f8db1b.

📒 Files selected for processing (3)
  • idl/pump_swap_idl.json (3 hunks)
  • learning-examples/pumpswap/manual_buy_pumpswap.py (2 hunks)
  • learning-examples/pumpswap/manual_sell_pumpswap.py (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@smypmsa smypmsa linked an issue Nov 4, 2025 that may be closed by this pull request
@smypmsa smypmsa merged commit 7ae8b56 into main Nov 4, 2025
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update PumpSwap examples to support breaking changes in program

2 participants