Created
March 27, 2019 13:29
-
-
Save MaryKuz/63bfedd6f0c4356a65b5741f3f9816b7 to your computer and use it in GitHub Desktop.
Stop a contract from executing
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
function transfer(address _to, uint256 _value) { | |
/* Check if sender has balance and for overflows */ | |
require(balanceOf[msg.sender] >= _value && balanceOf[_to] + _value >= balanceOf[_to]); | |
/* Add and subtract new balances */ | |
balanceOf[msg.sender] -= _value; | |
balanceOf[_to] += _value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment