-
-
Save kadenzipfel/05af7f6feee0d863bd0e18d98d21fd7e to your computer and use it in GitHub Desktop.
This file contains 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
// INSECURE | |
function withdraw() external { | |
uint256 amount = balances[msg.sender]; | |
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