AffiliateManager
This contract handles the management of affiliates for the LooksRare protocol.
isAffiliateProgramActive
bool isAffiliateProgramActive
Whether the affiliate program is active.
affiliateController
address affiliateController
Address of the affiliate controller.
affiliateRates
mapping(address => uint256) affiliateRates
It tracks the affiliate rate (in basis point) for a given affiliate address. The basis point represents how much of the protocol fee will be shared to the affiliate.
constructor
constructor(address _owner) public
Constructor
Parameters
Name | Type | Description |
---|---|---|
_owner | address | Owner address |
updateAffiliateRate
function updateAffiliateRate(address affiliate, uint256 bp) external
This function allows the affiliate controller to update the affiliate rate (in basis point).
Parameters
Name | Type | Description |
---|---|---|
affiliate | address | Affiliate address |
bp | uint256 | Rate (in basis point) to collect (e.g. 100 = 1%) per referred transaction |
updateAffiliateController
function updateAffiliateController(address newAffiliateController) external
This function allows the owner to update the affiliate controller address.
Only callable by owner.
Parameters
Name | Type | Description |
---|---|---|
newAffiliateController | address | New affiliate controller address |
updateAffiliateProgramStatus
function updateAffiliateProgramStatus(bool isActive) external
This function allows the owner to update the affiliate program status.
Only callable by owner.
Parameters
Name | Type | Description |
---|---|---|
isActive | bool | Whether the affiliate program is active |