Created
June 8, 2019 20:31
-
-
Save Solexplorer/1cb250e4c3e95c3372f91f0ea1db4e39 to your computer and use it in GitHub Desktop.
Transfer function
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 recipient, uint256 amount) public returns (bool) { | |
require(sender != address(0)); | |
require(recipient != address(0)); | |
_balances[sender] = _balances[sender].sub(amount); | |
_balances[recipient] = _balances[recipient].add(amount); | |
emit Transfer(sender, recipient, amount); | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment