-
Notifications
You must be signed in to change notification settings - Fork 522
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
Add weth wrapping hook #436
base: main
Are you sure you want to change the base?
Conversation
Note one constraint of this approach is that the input currency must already exist in poolmanager before the swap call. This could either be from existing standing liquidity or else the user must transfer input assets first |
73bb4a1
to
a13739b
Compare
) | ||
) | ||
); | ||
deployCodeTo("./foundry-out/WETHHook.sol/WETHHook.default.json", abi.encode(manager, weth), address(hook)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ooh whats the difference between this and etch? 👀 ive always used etch, never seen this function before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
etch you have to have the bytecode inline. best way to get that was to deploy a dummy version and then etch the bytecode over to the right address. but that the dummy version reverts on hook validation - so this lets me skip the dummy deployments tep
token wrapper adapter
Overview
This PR introduces a WETH (Wrapped Ether) hook for Uniswap v4, enabling native ETH to WETH conversions directly through v4 pools. The implementation provides a convenient way to wrap and unwrap ETH within a v4 lock / route.