Function: setSponsor(address basketToken, address sponsor)
This function is used to set the sponsor for a given basket token.
Inputs
basketToken
Control: Fully controlled by the admin.
Constraints:
basketToken
must have the_BASKET_TOKEN_ROLE
role.Impact: The basket token to set the sponsor for.
sponsor
Control: Fully controlled by the admin.
Constraints: None.
Impact: The new sponsor address.
Branches and code coverage
Intended branches
Update
basketTokenSponsors
for the givenbasketToken
with the newsponsor
.
Negative behavior
Revert if
basketToken
does not have the_BASKET_TOKEN_ROLE
role.
Function call analysis
this._checkIfBasketToken(basketToken) -> this._basketManager.hasRole(FeeCollector._BASKET_TOKEN_ROLE, token)
What is controllable?
basketToken
.If the return value is controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters or does other unusual control flow? N/A.