TwoKeyBaseReputationRegistry
contract TwoKeyBaseReputationRegistry
Index
Reference
Functions
getConversionHandlerAddress
function getConversionHandlerAddress(address acquisitionCampaign) internal view returns (address)
Internal getter from Acquisition campaign to fetch conersion handler address.
- Parameters:
acquisitionCampaign
- address- Returns:
- address
getLogicHandlerAddress
function getLogicHandlerAddress(address acquisitionCampaign) internal view returns (address)
Internal getter from Acquisition campaign to fetch logic handler address.
- Parameters:
acquisitionCampaign
- address- Returns:
- address
getReferrers
function getReferrers(address converter, address acquisitionCampaign) internal view returns (address[])
Function to get all referrers in the chain for specific converter.
- Parameters:
converter
- is the converter we want to get referral chainacquisitionCampaign
- is the acquisition campaign contract- Returns:
- array of addresses (referrers)
getRewardsByAddress
function getRewardsByAddress(address _address) public view returns (int, int, int)
Function to fetch reputation points per address.
- Parameters:
_address
- is the address of the user we want to check points for- Returns:
- encoded values in type bytes, unpackable by slices of 66,2,64,2,64,2 parsed to int / bool
setInitialParams
function setInitialParams(address _twoKeySingletoneRegistry, address _proxyStorage) public
Since using singletone pattern, this is replacement for the constructor.
- Parameters:
_twoKeySingletoneRegistry
- is the address of registry of all singleton contracts_proxyStorage
- address
updateOnConversionExecutedEvent
function updateOnConversionExecutedEvent(address converter, address contractor, address acquisitionCampaign) public
This function can only be called by TwoKeyConversionHandler contract assigned to the Acquisition from method param, If the conversion executed event occured, 10 points for the converter and contractor + 10/distance to referrer.
- Parameters:
converter
- is the address of the convertercontractor
- is the address of the contractoracquisitionCampaign
- is the address of the acquisition campaign so we can get referrers from there
updateOnConversionRejectedEvent
function updateOnConversionRejectedEvent(address converter, address contractor, address acquisitionCampaign) public
This function can only be called by TwoKeyConversionHandler contract assigned to the Acquisition from method param, If the conversion rejected event occured, giving penalty points.
- Parameters:
converter
- is the address of the convertercontractor
- is the address of the contractoracquisitionCampaign
- is the address of the acquisition campaign so we can get referrers from there
validateCall
function validateCall() internal view
Function to validate that the call is comming from validated campaign.