Function: setCodeOwner(byte[32] _code, address _newAccount)
This changes the owner of a referral code — to be called by the code owner.
Inputs
_code
Control: Fully controlled by caller.
Constraints: Must not be an empty code
(bytes32(0))
.Impact: The referral code to change ownership.
_newAccount
Control: Fully controlled by caller.
Constraints: None.
Impact: The new owner address.
Branches and code coverage
Intended branches
Updates the
codeOwner
of the provided_code
.
Negative behavior
Revert if
_code
is 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.