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
_tokenHashControl: Full control by owner.
Constraints: N/A.
Impact: There is no impact since it is not used.
_allowedControl: Full control by owner.
Constraints: N/A.
Impact: If
_allowedis true, the_tokenHashwill be added to theallowedTokenSet; if_allowedis false, the_tokenHashwill be removed fromallowedTokenSet.
Branches and code coverage
Intended branches
New hash was added successfully if
_allowedis true.New hash was removed successfully if
_allowedis false.
Negative behavior
Zero hash.
The same hash already added if
_allowedis true.allowedTokenSetdoes not contain the hash if_allowedis false.Caller is not an owner.