feat: Add minOutShares to weETH (DEV-1121) - #223
Conversation
Summary by OctaneNew ContractsNo new contracts were added. Updated Contracts
🔗 Commit Hash: 7423165 |
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
WalkthroughA new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Comment |
Overview
🔗 Commit Hash: 7423165 |
| function amountForShare(uint256 shareAmount) external view returns (uint256); | ||
| function deposit() external; | ||
| function requestWithdraw(address receiver,uint256 amount) external returns (uint256 requestId); | ||
| function sharesForAmount(uint256 amount) external view returns (uint256); |
There was a problem hiding this comment.
removed this
| } | ||
|
|
||
| function _getMinSharesOut(uint256 amount) internal view returns (uint256) { | ||
| return liquidityPool.sharesForAmount(amount) * 99 / 100; |
There was a problem hiding this comment.
Should define ILiquidityPoolLike in the test file if it has a different interface
There was a problem hiding this comment.
defined a different interface
|
|
||
| vm.prank(relayer); | ||
| vm.expectRevert("MC/slippage-too-high"); | ||
| mainnetController.depositToWeETH(1_000e18, 1_000e18); |
There was a problem hiding this comment.
Try minSharesOut + 1 here
| mainnetController.depositToWeETH(1_000e18, 0); | ||
| } | ||
|
|
||
| function test_depositToWeETH_slippageTooHigh() external { |
There was a problem hiding this comment.
slippageTooHighBoundary
3a85501 to
ddbb792
Compare
|
Coverage after merging DEV-1121-add-minout into dev will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Summary by CodeRabbit
Release Notes
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.