Function: approve(address _spender, uint256 _amount)
Allows approving allowances for transferring tokens.
Inputs
_spender
Control: Fully controlled by the caller.
Constraints: None.
Impact: The account that will be allowed to transfer tokens.
_amount
Control: Fully controlled by the caller.
Constraints: None.
Impact: The amount of tokens to be allowed to be transferred.
Branches and code coverage (including function calls)
Intended branches
Sets the allowance of
_spender
to_amount
for themsg.sender
.Check that
_spender
and_owner
are not the zero address (in_approve
).
Negative behavior
Should not allow approving tokens on behalf of others.