Skip to content

Conversation

@thal0x
Copy link
Member

@thal0x thal0x commented May 28, 2025

Updates swap router to wrap and unwrap ETH.

  • If tokenIn = address(0), convert ETH to WETH
  • If tokenOut = address(0), convert WETH to ETH
  • For swapExactOut, ensure any unused ETH is refunded to the user

@thal0x thal0x self-assigned this May 28, 2025
@linear
Copy link

linear bot commented May 28, 2025

vm.startBroadcast();

SkipGoSwapRouter router = SkipGoSwapRouter(0xa11CC0eFb1B3AcD95a2B8cd316E8c132E16048b5);
address weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
Copy link
Collaborator

Choose a reason for hiding this comment

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

is weth address the same on all chains?

Copy link
Member Author

Choose a reason for hiding this comment

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

No I'm going to have to update this script for more proper deployments, I just wrote this to deploy a contract I could test with

@thal0x thal0x merged commit ae2aca2 into jw/swap-router-adjustments May 30, 2025
1 check failed
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