ReferralsUtils

GNSReferrals facet internal library

initializeReferrals

function initializeReferrals(uint256 _allyFeeP, uint256 _startReferrerFeeP, uint256 _targetVolumeUsd) internal

Check IReferralsUtils interface for documentation

updateAllyFeeP

function updateAllyFeeP(uint256 _value) internal

Check IReferralsUtils interface for documentation

updateStartReferrerFeeP

function updateStartReferrerFeeP(uint256 _value) internal

Check IReferralsUtils interface for documentation

updateReferralsTargetVolumeUsd

function updateReferralsTargetVolumeUsd(uint256 _value) internal

Check IReferralsUtils interface for documentation

whitelistAllies

function whitelistAllies(address[] _allies) internal

Check IReferralsUtils interface for documentation

unwhitelistAllies

function unwhitelistAllies(address[] _allies) internal

Check IReferralsUtils interface for documentation

whitelistReferrers

function whitelistReferrers(address[] _referrers, address[] _allies) internal

Check IReferralsUtils interface for documentation

unwhitelistReferrers

function unwhitelistReferrers(address[] _referrers) internal

Check IReferralsUtils interface for documentation

registerPotentialReferrer

function registerPotentialReferrer(address _trader, address _referrer) internal

Check IReferralsUtils interface for documentation

distributeReferralReward

function distributeReferralReward(address _trader, uint256 _volumeUsd, uint256 _referrerFeeUsd, uint256 _gnsPriceUsd) internal

Check IReferralsUtils interface for documentation

claimAllyRewards

function claimAllyRewards() internal

Check IReferralsUtils interface for documentation

claimReferrerRewards

function claimReferrerRewards() internal

Check IReferralsUtils interface for documentation

getReferrerFeeProgressP

function getReferrerFeeProgressP(address _referrer) internal view returns (uint256 progressP)

Check IReferralsUtils interface for documentation

getTraderLastReferrer

function getTraderLastReferrer(address _trader) internal view returns (address)

Check IReferralsUtils interface for documentation

getTraderActiveReferrer

function getTraderActiveReferrer(address _trader) internal view returns (address)

Check IReferralsUtils interface for documentation

getReferrersReferred

function getReferrersReferred(address _ally) internal view returns (address[])

Check IReferralsUtils interface for documentation

getTradersReferred

function getTradersReferred(address _referrer) internal view returns (address[])

Check IReferralsUtils interface for documentation

getReferralsAllyFeeP

function getReferralsAllyFeeP() internal view returns (uint256)

Check IReferralsUtils interface for documentation

getReferralsStartReferrerFeeP

function getReferralsStartReferrerFeeP() internal view returns (uint256)

Check IReferralsUtils interface for documentation

getReferralsTargetVolumeUsd

function getReferralsTargetVolumeUsd() internal view returns (uint256)

Check IReferralsUtils interface for documentation

getAllyDetails

function getAllyDetails(address _ally) internal view returns (struct IReferrals.AllyDetails)

Check IReferralsUtils interface for documentation

getReferrerDetails

function getReferrerDetails(address _referrer) internal view returns (struct IReferrals.ReferrerDetails)

Check IReferralsUtils interface for documentation

_getSlot

function _getSlot() internal pure returns (uint256)

Returns storage slot to use when fetching storage relevant to library

_getStorage

function _getStorage() internal pure returns (struct IReferrals.ReferralsStorage s)

Returns storage pointer for storage struct in diamond contract, at defined slot

_whitelistAlly

function _whitelistAlly(address _ally) internal

Whitelists new ally

Parameters

_unwhitelistAlly

function _unwhitelistAlly(address _ally) internal

Unwhitelists ally

Parameters

_whitelistReferrer

function _whitelistReferrer(address _referrer, address _ally) internal

Whitelists new referrer

Parameters

_unwhitelistReferrer

function _unwhitelistReferrer(address _referrer) internal

Unwhitelists referrer

Parameters