Function: transfer(address _recipient, uint256 _amount)
Performs the transfer of tokens.
Inputs
_recipientControl: Fully controlled by the caller.
Constraints: None.
Impact: The account that will receive the tokens.
_amountControl: Fully controlled by the caller.
Constraints: Checked that
msg.sendercan afford to transfer_amountof tokens.Impact: The amount of tokens to be transferred.
Branches and code coverage (including function calls)
Intended branches
Checks that the
_senderhas enough balance.Checks that the
_recipientis not the zero address.Checks that the
_amountis greater than zero.Decreases the
balancesfor the_sender.Increases the
balancesfor the_recipient.
Negative behavior
Should not allow transferring more tokens than the
_senderhas.