Message: ExecuteMsg::ClaimOwnership
This allows the pending owner to claim ownership of the contract, transferring privileges from the current owner.
Inputs
info.senderValidation: The
claim_ownershipfunction ensures that theinfo.sendermatches the pending owner set in the contract state.Impact: The sender becomes the new owner upon successful execution.
Branches and code coverage (including function calls)
Intended branches
If the
info.sendermatches the pending owner, ownership is transferred and the pending owner is cleared.
Negative behavior
Fail if no pending owner is set.
Fail if the
info.senderdoes not match the pending owner.