Skip to content

fix(bundler): never skip recovery transfers in Paraswap/ERC20Wrapper ops#518

Merged
Rubilmax merged 2 commits intomainfrom
Rubilmax/fix-paraswap-skiprevert
Mar 9, 2026
Merged

fix(bundler): never skip recovery transfers in Paraswap/ERC20Wrapper ops#518
Rubilmax merged 2 commits intomainfrom
Rubilmax/fix-paraswap-skiprevert

Conversation

@Rubilmax
Copy link
Collaborator

@Rubilmax Rubilmax commented Mar 6, 2026

Summary

  • Recovery erc20Transfer calls that sweep leftover tokens from paraswapAdapter and erc20WrapperAdapter back to generalAdapter1 now always have skipRevert: false
  • Prevents tokens from being stranded on adapters when an integrator enables skipRevert=true for best-effort swaps
  • Funding and swap sub-actions retain operation.skipRevert to preserve best-effort semantics

Test plan

  • Verify existing Paraswap tests pass (leverage, close position, deleverage)
  • Verify ERC20Wrapper tests pass
  • Confirm no type errors in modified source files

Resolves SDK-94, SDK-93

🤖 Generated with Claude Code

…per ops

Recovery erc20Transfer calls that sweep leftover tokens from paraswapAdapter
and erc20WrapperAdapter back to generalAdapter1 now always have skipRevert=false,
preventing tokens from being stranded on adapters when an integrator enables
skipRevert=true for best-effort swaps.

Resolves SDK-94

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

linear bot commented Mar 6, 2026

@Rubilmax Rubilmax self-assigned this Mar 6, 2026
@Rubilmax Rubilmax marked this pull request as ready for review March 6, 2026 16:32
@Rubilmax
Copy link
Collaborator Author

Rubilmax commented Mar 6, 2026

@CoeX

@Rubilmax
Copy link
Collaborator Author

Rubilmax commented Mar 6, 2026

@codex

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

oumar-fall
oumar-fall previously approved these changes Mar 9, 2026
Copy link
Collaborator

@oumar-fall oumar-fall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add test?

Foulks-Plb
Foulks-Plb previously approved these changes Mar 9, 2026
Tests that Paraswap_Buy, Paraswap_Sell, erc20WrapperDepositFor, and
erc20WrapperWithdrawTo recovery transfers always have skipRevert=false,
even when the operation itself has skipRevert=true.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Rubilmax Rubilmax dismissed stale reviews from Foulks-Plb and oumar-fall via 7ce6e7b March 9, 2026 08:51
@Rubilmax Rubilmax merged commit 5a725ba into main Mar 9, 2026
16 checks passed
@Rubilmax Rubilmax deleted the Rubilmax/fix-paraswap-skiprevert branch March 9, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants