Last active
January 13, 2022 19:27
-
-
Save voith/69c9dce58885c5bcf39766715719f4f3 to your computer and use it in GitHub Desktop.
Sample solidity function
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
pragma solidity ^0.5.16; | |
contract DummyERC20 is ERC20 { | |
function withdraw() external { | |
uint256 amount = balances[msg.sender]; | |
// demo reentracy | |
require(msg.sender.call.value(amount)()); | |
balances[msg.sender] = 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment