Function: setAllowedToken(byte[32] _tokenHash, bool _allowed)
This allows the owner of the contract to add the allowed token
hash and also remove it from allowedTokenSet
.
Inputs
_tokenHash
Control: Full control by owner.
Constraints: N/A.
Impact: There is no impact since it is not used.
_allowed
Control: Full control by owner.
Constraints: N/A.
Impact: If
_allowed
is true, the_tokenHash
will be added to theallowedTokenSet
; if_allowed
is false, the_tokenHash
will be removed fromallowedTokenSet
.
Branches and code coverage
Intended branches
New hash was added successfully if
_allowed
is true.New hash was removed successfully if
_allowed
is false.
Negative behavior
Zero hash.
The same hash already added if
_allowed
is true.allowedTokenSet
does not contain the hash if_allowed
is false.Caller is not an owner.