Skip to content

Commit

Permalink
refactor: deposit for
Browse files Browse the repository at this point in the history
  • Loading branch information
MerlinEgalite committed Oct 9, 2024
1 parent 9be7e12 commit ba7127a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Wrapper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ contract Wrapper {
address public constant DAO = address(0x0);
address public constant MORPHO = address(0x0);

function wrap(uint256 amount) external {
// Compliant to ERC20Wrapper for convenience.
function depositFor(address account, uint256 amount) public returns (bool) {
IERC20(LEGACY_MORPHO).transferFrom(msg.sender, address(this), amount);
IBurn(LEGACY_MORPHO).burn(amount);
IERC20(MORPHO).transferFrom(DAO, msg.sender, amount);
IERC20(MORPHO).transferFrom(DAO, account, amount);
return true;
}
}

0 comments on commit ba7127a

Please sign in to comment.