Skip to content

Instantly share code, notes, and snippets.

@Haseeb-Qureshi
Created February 26, 2020 06:51
Show Gist options
  • Save Haseeb-Qureshi/bf3d0056948756be1c294c91d304e765 to your computer and use it in GitHub Desktop.
Save Haseeb-Qureshi/bf3d0056948756be1c294c91d304e765 to your computer and use it in GitHub Desktop.
FlashERC20
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