Function: setCodeOwner(byte[32] _code, address _newAccount)
This changes the owner of a referral code — to be called by the code owner.
Inputs
_codeControl: Fully controlled by caller.
Constraints: Must not be an empty code
(bytes32(0)).Impact: The referral code to change ownership.
_newAccountControl: Fully controlled by caller.
Constraints: None.
Impact: The new owner address.
Branches and code coverage
Intended branches
Updates the
codeOwnerof the provided_code.
Negative behavior
Revert if
_codeis an empty code(bytes32(0)). (Prevents changing ownership for an invalid code.)Revert if the caller is not the current owner of the code. This ensures that only the current owner can change ownership.
Function call analysis
No external function calls found.