Function: registerCode(byte[32] _code)
This registers a referral code for the sender — to be called by referrer.
Inputs
_code
Control: Fully controlled by caller.
Constraints: The
_code
should not bebytes32(0)
andcodeOwners
should not be already registered.Impact: The referral code to register.
Branches and code coverage
Intended branches
The
codeOwners
,codes
, andreferrerTiers
is correctly updated.
Negative behavior
Revert if
_code
isbytes32(0)
.Revert if
codeOwners[_code] != address(0)
.
Function call analysis
No external function calls found.