Message: ExecuteMsg::RemoveAgent
This removes an agent from the whitelist.
Inputs
info.senderValidation: The
remove_agentfunction verifies that theinfo.senderis an existing agent.Impact: Ensures only authorized agents can initiate the removal of other agents from the whitelist.
agent_to_removeValidation: The
agent_to_removeaddress is validated usingdeps.api.addr_validate. Additionally, the address must not belong to the owner and must already exist in the whitelist.Impact: Specifies the agent to be removed, affecting the whitelist state.
Branches and code coverage (including function calls)
Intended branches
If the
agent_to_removeaddress is valid, not the owner, and exists in the whitelist, it is removed.
Negative behavior
Fail if the
info.senderis not an agent.Fail if the
agent_to_removeaddress is invalid.Fail if the
agent_to_removeaddress belongs to the owner.Fail if the
agent_to_removeaddress is not in the whitelist.