Skip to content

feat, test: support modifying calldata for swaps unwrapping WETH #543

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alanhwu
Copy link
Collaborator

@alanhwu alanhwu commented Mar 27, 2025

  • Observed some swaps using the UNWRAP_WETH command from UniversalRouter
  • It is being used in lieu of SWEEP, so the recipient field must be updated the same way we update the SWEEP recipient for most swaps

@alanhwu alanhwu requested a review from codyborn March 27, 2025 23:39
const unwrapInput = this.inputsArray[unwrapIndex];
// Decode unwrap parameters
const [, amountMin] = defaultAbiCoder.decode(
['address', 'uint256'],
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: we can add these as constants somewhere so a typo doesn't get us at some point

Copy link
Collaborator

@codyborn codyborn left a comment

Choose a reason for hiding this comment

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

Nice!

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.

2 participants