Message: ExecuteMsg::AddUserToWhitelist
This adds a user to the whitelist.
Inputs
info.sender
Validation: The
add_user_to_whitelist
function verifies that theinfo.sender
is an agent.Impact: Ensures only authorized agents can add users to the whitelist.
user
Validation: The
user
address 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
user
address is valid and not already whitelisted, they are added to the whitelist.
Negative behavior
Fail if the
info.sender
is not an agent.Fail if the
user
address is invalid.Fail if the
user
is already whitelisted.