Skip to content

Instantly share code, notes, and snippets.

@kadenzipfel
Created December 3, 2019 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kadenzipfel/05af7f6feee0d863bd0e18d98d21fd7e to your computer and use it in GitHub Desktop.
Save kadenzipfel/05af7f6feee0d863bd0e18d98d21fd7e to your computer and use it in GitHub Desktop.
// 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