Function: setAllowedBroker(byte[32] _brokerHash, bool _allowed)
This allows the owner of the contract to add the hash of allowed broker
and also remove it from the list of trusted brokers.
Inputs
_brokerHash
Control: Full control by owner.
Constraints:
allowedBrokerSet
should not contain the_brokerHash
if_allowed
is true and vice versa.Impact: Hash of the broker that the user will be allowed to use for deposit.
_allowed
Control: Full control by owner.
Constraints: N/A.
Impact: If
_allowed
is true, the_brokerHash
will be added; if_allowed
is false, the_brokerHash
will be removed.
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 was already added if
_allowed
is true.allowedBrokerSet
does not contain the hash if_allowed
is false.Caller is not an owner.