Conversation
📝 WalkthroughWalkthroughThe pull request introduces blocked recipient validation for CLAMM and StableSwap swap operations, refactors the SwapToBase flow to route both paths through a shared helper function, updates corresponding tests to use the fee collector module account, and adds an operational note regarding potential stableswap-backed gas-price swap failures. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
da125df to
8eda438
Compare
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches. Re-running this action after a short time may resolve the issue. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@x/move/keeper/dex.go`:
- Around line 324-338: The route is not atomic: k.moveBankKeeper.SendCoin debits
addr before swap() and later GetBalance/SendCoin to refund can fail, leaving
funds stranded on types.StdAddr; wrap the entire sequence (the initial SendCoin,
swap(), balance check and possible payout using
prevBaseBalance/baseDenom/baseBalanceDiff) inside a cached context/transaction
and only commit if swap() and the payout succeed, or implement an explicit
rollback/refund path that returns the quote/base from types.StdAddr back to addr
on any error—ensure the swap() caller (the higher-order call site suggested
around the former lines 279-300) accepts and uses the provided cached context so
the whole operation is committed atomically.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: d87c5514-8695-48c1-b62f-137ed8d02392
📒 Files selected for processing (5)
x/move/keeper/clamm_test.gox/move/keeper/dex.gox/move/keeper/dex_test.gox/move/keeper/stableswap_test.gox/move/keeper/whitelist.go
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #509 +/- ##
==========================================
+ Coverage 38.09% 38.11% +0.01%
==========================================
Files 325 325
Lines 30819 30832 +13
==========================================
+ Hits 11742 11752 +10
- Misses 17184 17186 +2
- Partials 1893 1894 +1
🚀 New features to boost your workflow:
|
Description
Closes: N/A
Route DEX swap execution for blocked recipients through
StdAddrin the dex layer instead of calling stableswap or CLAMM directly from the original recipient.This change does three things:
StdAddrrouting pattern to stableswap-backed dex swapsDexKeeperCritical files to review:
x/move/keeper/dex.gox/move/keeper/dex_test.gox/move/keeper/stableswap_test.gox/move/keeper/clamm_test.goAuthor Checklist
I have...
!in the type prefix if API or client breaking changeNotes:
Reviewers Checklist
I have...