Write your code inside the SwapRocketPool contract
This exercise is designed to gain experience redeeming ETH from rETH.
function swapRethToEth(uint256 rEthAmount) external {
// Write your code here
}-
Swap rETH to ETH
- Implement logic to burn rETH and redeem ETH.
- This contract will be given approval to pull rETH from
msg.sender. - Don't forget to declare a payable
receivefunction to be able to receive ETH.
Hint: Call the function
reth.burnto burn rETH.
forge test --fork-url $FORK_URL --match-path test/exercise-swap-rocket-pool.sol --match-test test_swapRethToEth -vvv