Message: ExecuteMsg::AddUserToWhitelist
This adds a user to the whitelist.
Inputs
info.senderValidation: The
add_user_to_whitelistfunction verifies that theinfo.senderis an agent.Impact: Ensures only authorized agents can add users to the whitelist.
userValidation: The
useraddress is validated usingdeps.api.addr_validate. Additionally, it ensures the user is not already whitelisted by checking their current status.Impact: Specifies the user to be added to the whitelist, changing their status.
Branches and code coverage (including function calls)
Intended branches
If the
useraddress is valid and not already whitelisted, they are added to the whitelist.
Negative behavior
Fail if the
info.senderis not an agent.Fail if the
useraddress is invalid.Fail if the
useris already whitelisted.