-
Notifications
You must be signed in to change notification settings - Fork 39
an adapter contract to support withdrawal from weETH #287
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
base: master
Are you sure you want to change the base?
Conversation
add max withdrawal size
_requireNotPaused(); | ||
_; | ||
} | ||
} |
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.
Bug: Missing Conversion Function Causes Compilation Errors
The WeETHWithdrawAdapter
contract implements IWeETHWithdrawAdapter
but is missing the getEETHByWeETH
function declared in the interface. This causes compilation errors and leaves a gap in the public interface, as users might expect this function for conversion rate calculations.
uint256 eETHAmount = weETH.unwrap(weETHAmount); | ||
|
||
// Approve eETH to be spent by LiquidityPool | ||
IERC20(address(eETH)).safeApprove(address(liquidityPool), eETHAmount); |
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.
uint256 requestId = nextRequestId++; | ||
uint32 feeGwei = uint32(fee / 1 gwei); | ||
|
||
if(amountOfEEth > maxWithdrawalAmount) revert TooLargeWithdrawalAmount(); |
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.
Note
Adds a weETH withdrawal adapter (incl. permit flow) and enforces an admin-configurable max withdrawal amount in WithdrawRequestNFT.
src/WeETHWithdrawAdapter.sol
(new):weETH
by unwrapping toeETH
and creating requests viaLiquidityPool
.requestWithdrawWithPermit
.RoleRegistry
, emits pause events; exposesgetImplementation
.src/interfaces/IWeETHWithdrawAdapter.sol
(new interface):requestWithdraw
,requestWithdrawWithPermit
(withPermitInput
),getEETHByWeETH
, andWithdrawRequested
event.maxWithdrawalAmount
withsetMaxWithdrawalAmount
(admin-only).requestWithdraw
to revert withTooLargeWithdrawalAmount
when exceeding the cap.Written by Cursor Bugbot for commit 63ee206. This will update automatically on new commits. Configure here.