Created
          February 26, 2020 06:51 
        
      - 
      
 - 
        
Save Haseeb-Qureshi/bf3d0056948756be1c294c91d304e765 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