-
-
Save amadeobrands/8955c792c720f6ea97b14eb09ae0b112 to your computer and use it in GitHub Desktop.
FlashERC20
This file contains hidden or 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
| interface Lender { | |
| function goWild() external; | |
| } | |
| contract FlashERC20 is ERC20 { | |
| using SafeMath for uint256; | |
| function flash(uint256 amount) external { | |
| balances[msg.sender] = balances[msg.sender].add(amount); | |
| Lender(msg.sender).goWild(); | |
| balances[msg.sender] = balances[msg.sender].sub(amount); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment