TwoKeyConversionHandler
contract TwoKeyConversionHandler
Index
Reference
Functions
converterCancelConversion
function converterCancelConversion(uint _conversionId) externalReturns all the funds to the converter back, Function to cancel conversion and get back money.
- Parameters:
_conversionId- is the id of the conversion
emitConvertedEvent
function emitConvertedEvent(address converterAddress, uint baseTokens, uint bonusTokens, uint conversionAmount, bool isFiatConversion, uint conversionId) internal view- Parameters:
converterAddress- addressbaseTokens- uintbonusTokens- uintconversionAmount- uintisFiatConversion- boolconversionId- uint
emitExecutedEvent
function emitExecutedEvent(address _converterAddress, uint conversionId, uint tokens) internal view- Parameters:
_converterAddress- addressconversionId- uinttokens- uint
emitRejectedEvent
function emitRejectedEvent(address _campaignAddress, address _converterAddress) internal view- Parameters:
_campaignAddress- address_converterAddress- address
executeConversion
function executeConversion(uint _conversionId) publicFunction to perform all the logic which has to be done when we're performing conversion.
- Parameters:
_conversionId- is the id
getConversion
function getConversion(uint conversionId) external view returns (bytes)Function to get conversion details by id.
- Parameters:
conversionId- is the id of conversion- Returns:
- bytes
getConverterPurchasesStats
function getConverterPurchasesStats(address _converter) public view returns (uint, uint, uint)Function to fetch how much user spent money and bought units in total.
- Parameters:
_converter- is the converter we're checking this information for- Returns:
- uint
- uint
- uint
rejectConverter
function rejectConverter(address _converter) publicOnly maintainer or contractor can call this function, Function where we can reject converter.
- Modifiers:
- onlyContractorOrMaintainer
- Parameters:
_converter- is the address of converter
setInitialParamsConversionHandler
function setInitialParamsConversionHandler(uint[] values, address _twoKeyAcquisitionCampaignERC20, address _twoKeyPurchasesHandler, address _contractor, address _assetContractERC20, address _twoKeySingletonRegistry) public- Parameters:
values- uint[]_twoKeyAcquisitionCampaignERC20- address_twoKeyPurchasesHandler- address_contractor- address_assetContractERC20- address_twoKeySingletonRegistry- address
supportForCreateConversion
function supportForCreateConversion(address _contractor, address _converterAddress, uint256 _conversionAmount, uint256 _maxReferralRewardETHWei, uint256 baseTokensForConverterUnits, uint256 bonusTokensForConverterUnits, bool isConversionFiat, bool _isAnonymous, bool _isKYCRequired) public returns (uint)This function can only be called from TwoKeyAcquisitionCampaign contract address, Support function to create conversion.
- Parameters:
_contractor- is the address of campaign contractor_converterAddress- is the address of the converter_conversionAmount- is the amount for conversion in ETH_maxReferralRewardETHWei- uint256baseTokensForConverterUnits- uint256bonusTokensForConverterUnits- uint256isConversionFiat- bool_isAnonymous- bool_isKYCRequired- bool- Returns:
- uint