Message: ExecuteMsg::AddValidator
This allows the admin to add a new validator that can be staked to.
Inputs
info.sender
Validation: The
add_validator
function verifies that theinfo.sender
is the contract owner.Impact: N/A.
validator_addr
Validation: The address is verified to ensure it exists in the current validator set and is not already in the contract's validator list.
Impact: This is the address of the validator to be added.
Branches and code coverage (including function calls)
Intended branches
If
validator_addr
is valid, it is added to the list of enabled validators in the contract state.
Negative behavior
Fail if
validator_addr
already exists in the validator list.Fail if
validator_addr
is not part of the current validator set.