Last active
September 1, 2022 03:30
-
-
Save 0xAnon101/279522ea5586c6cd87d5dbe368156733 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.8.0; | |
interface IFlashLoanEtherReceiver { | |
function execute() external payable; | |
} | |
contract SideEntranceLenderPool { | |
// ... | |
function deposit() external payable { | |
balances[msg.sender] += msg.value; | |
} | |
function withdraw() external { | |
uint256 amountToWithdraw = balances[msg.sender]; // withdraw to sender | |
balances[msg.sender] = 0; // make sender balance 0 | |
payable(msg.sender).sendValue(amountToWithdraw); | |
} | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment