Skip to content

Instantly share code, notes, and snippets.

@amadeobrands
Forked from Haseeb-Qureshi/flasherc20.js
Created May 26, 2020 06:39
Show Gist options
  • Select an option

  • Save amadeobrands/8955c792c720f6ea97b14eb09ae0b112 to your computer and use it in GitHub Desktop.

Select an option

Save amadeobrands/8955c792c720f6ea97b14eb09ae0b112 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