TwoKeyEventSource
contract TwoKeyEventSource
Index
- AcquisitionCampaignCreated
- Cancelled
- Converted
- ConvertedAcquisition
- ConvertedAcquisitionV2
- ConvertedDonation
- ConvertedDonationV2
- Created
- DonationCampaignCreated
- Executed
- ExecutedV1
- Joined
- PriceUpdated
- ReceivedEther
- Rejected
- Rewarded
- UpdatedData
- UpdatedPublicMetaHash
- UserRegistered
- acquisitionCampaignCreated
- cancelled
- converted
- convertedAcquisition
- convertedAcquisitionV2
- convertedDonation
- convertedDonationV2
- created
- donationCampaignCreated
- ethereumOf
- executed
- executedV1
- getTwoKeyDefaultIntegratorFeeFromAdmin
- getTwoKeyDefaultNetworkTaxPercent
- isAddressMaintainer
- joined
- onlyAllowedContracts
- onlyTwoKeyCampaignValidator
- plasmaOf
- priceUpdated
- rejected
- rewarded
- setInitialParams
- userRegistered
Reference
Events
AcquisitionCampaignCreated
event AcquisitionCampaignCreated(address proxyLogicHandler, address proxyConversionHandler, address proxyAcquisitionCampaign, address proxyPurchasesHandler, address contractor)
- Parameters:
proxyLogicHandler
- addressproxyConversionHandler
- addressproxyAcquisitionCampaign
- addressproxyPurchasesHandler
- addresscontractor
- address
Cancelled
event Cancelled(address _campaign, address _converter, uint256 _indexOrAmount)
- Parameters:
_campaign
- address_converter
- address_indexOrAmount
- uint256
Converted
event Converted(address _campaign, address _converter, uint256 _amount)
- Parameters:
_campaign
- address_converter
- address_amount
- uint256
ConvertedAcquisition
event ConvertedAcquisition(address _campaign, address _converter, uint256 _baseTokens, uint256 _bonusTokens, uint256 _conversionAmount, bool _isFiatConversion)
- Parameters:
_campaign
- address_converter
- address_baseTokens
- uint256_bonusTokens
- uint256_conversionAmount
- uint256_isFiatConversion
- bool
ConvertedAcquisitionV2
event ConvertedAcquisitionV2(address _campaign, address _converterPlasma, uint256 _baseTokens, uint256 _bonusTokens, uint256 _conversionAmount, bool _isFiatConversion, uint _conversionId)
- Parameters:
_campaign
- address_converterPlasma
- address_baseTokens
- uint256_bonusTokens
- uint256_conversionAmount
- uint256_isFiatConversion
- bool_conversionId
- uint
ConvertedDonation
event ConvertedDonation(address _campaign, address _converter, uint _conversionAmount)
- Parameters:
_campaign
- address_converter
- address_conversionAmount
- uint
ConvertedDonationV2
event ConvertedDonationV2(address _campaign, address _converterPlasma, uint _conversionAmount, uint _conversionId)
- Parameters:
_campaign
- address_converterPlasma
- address_conversionAmount
- uint_conversionId
- uint
Created
event Created(address _campaign, address _owner, address _moderator)
- Parameters:
_campaign
- address_owner
- address_moderator
- address
DonationCampaignCreated
event DonationCampaignCreated(address proxyDonationCampaign, address proxyDonationConversionHandler, address proxyDonationLogicHandler, address contractor)
- Parameters:
proxyDonationCampaign
- addressproxyDonationConversionHandler
- addressproxyDonationLogicHandler
- addresscontractor
- address
Executed
event Executed(address campaignAddress, address converterPlasmaAddress, uint conversionId)
- Parameters:
campaignAddress
- addressconverterPlasmaAddress
- addressconversionId
- uint
ExecutedV1
event ExecutedV1(address campaignAddress, address converterPlasmaAddress, uint conversionId, uint tokens)
- Parameters:
campaignAddress
- addressconverterPlasmaAddress
- addressconversionId
- uinttokens
- uint
Joined
event Joined(address _campaign, address _from, address _to)
- Parameters:
_campaign
- address_from
- address_to
- address
PriceUpdated
event PriceUpdated(bytes32 _currency, uint newRate, uint _timestamp, address _updater)
- Parameters:
_currency
- bytes32newRate
- uint_timestamp
- uint_updater
- address
ReceivedEther
event ReceivedEther(address _sender, uint value)
- Parameters:
_sender
- addressvalue
- uint
Rejected
event Rejected(address _campaign, address _converter)
- Parameters:
_campaign
- address_converter
- address
Rewarded
event Rewarded(address _campaign, address _to, uint256 _amount)
- Parameters:
_campaign
- address_to
- address_amount
- uint256
UpdatedData
event UpdatedData(uint timestamp, uint value, string action)
- Parameters:
timestamp
- uintvalue
- uintaction
- string
UpdatedPublicMetaHash
event UpdatedPublicMetaHash(uint timestamp, string value)
- Parameters:
timestamp
- uintvalue
- string
UserRegistered
event UserRegistered(string _name, address _address, string _fullName, string _email, string _username_walletName)
- Parameters:
_name
- string_address
- address_fullName
- string_email
- string_username_walletName
- string
Modifiers
onlyAllowedContracts
modifier onlyAllowedContracts()
Modifier which will allow only completely verified and validated contracts to call some functions.
onlyTwoKeyCampaignValidator
modifier onlyTwoKeyCampaignValidator()
Modifier which will allow only TwoKeyCampaignValidator to make some calls.
Functions
acquisitionCampaignCreated
function acquisitionCampaignCreated(address proxyLogicHandler, address proxyConversionHandler, address proxyAcquisitionCampaign, address proxyPurchasesHandler, address contractor) external
Function to emit event every time someone starts new Acquisition campaign.
- Parameters:
proxyLogicHandler
- is the address of TwoKeyAcquisitionLogicHandler proxy deployed by TwoKeyFactoryproxyConversionHandler
- is the address of TwoKeyConversionHandler proxy deployed by TwoKeyFactoryproxyAcquisitionCampaign
- is the address of TwoKeyAcquisitionCampaign proxy deployed by TwoKeyFactoryproxyPurchasesHandler
- is the address of TwoKeyPurchasesHandler proxy deployed by TwoKeyFactorycontractor
- address
cancelled
function cancelled(address _campaign, address _converter, uint256 _indexOrAmount) external
Function to emit created event every time campaign is cancelled.
- Modifiers:
- onlyAllowedContracts
- Parameters:
_campaign
- is the address of the cancelled campaign_converter
- is the address of the converter_indexOrAmount
- is the amount of campaign
converted
function converted(address _campaign, address _converter, uint256 _conversionAmount) external
Function to emit converted event.
- Modifiers:
- onlyAllowedContracts
- Parameters:
_campaign
- is the address of main campaign contract_converter
- is the address of converter during the conversion_conversionAmount
- is conversion amount
convertedAcquisition
function convertedAcquisition(address _campaign, address _converter, uint256 _baseTokens, uint256 _bonusTokens, uint256 _conversionAmount, bool _isFiatConversion) external
- Modifiers:
- onlyAllowedContracts
- Parameters:
_campaign
- address_converter
- address_baseTokens
- uint256_bonusTokens
- uint256_conversionAmount
- uint256_isFiatConversion
- bool
convertedAcquisitionV2
function convertedAcquisitionV2(address _campaign, address _converterPlasma, uint256 _baseTokens, uint256 _bonusTokens, uint256 _conversionAmount, bool _isFiatConversion, uint _conversionId) external
This function updates values in TwoKeyRegistry contract, Function to emit created event every time conversion happened under AcquisitionCampaign.
- Modifiers:
- onlyAllowedContracts
- Parameters:
_campaign
- is the address of the deployed campaign_converterPlasma
- is the converter address_baseTokens
- is the amount of tokens bought_bonusTokens
- is the amount of bonus tokens received_conversionAmount
- is the amount of conversion_isFiatConversion
- is flag representing if conversion is either FIAT or ETHER_conversionId
- is the id of conversion
convertedDonation
function convertedDonation(address _campaign, address _converter, uint256 _conversionAmount) external
- Modifiers:
- onlyAllowedContracts
- Parameters:
_campaign
- address_converter
- address_conversionAmount
- uint256
convertedDonationV2
function convertedDonationV2(address _campaign, address _converterPlasma, uint256 _conversionAmount, uint256 _conversionId) external
Function to emit created event every time conversion happened under DonationCampaign.
- Modifiers:
- onlyAllowedContracts
- Parameters:
_campaign
- is the address of main campaign contract_converterPlasma
- is the address of the converter_conversionAmount
- is the amount of conversion_conversionId
- is the id of conversion
created
function created(address _campaign, address _owner, address _moderator) external
This function updates values in TwoKeyRegistry contract, Function to emit created event every time campaign is created.
- Modifiers:
- onlyTwoKeyCampaignValidator
- Parameters:
_campaign
- is the address of the deployed campaign_owner
- is the contractor address of the campaign_moderator
- is the address of the moderator in campaign
donationCampaignCreated
function donationCampaignCreated(address proxyDonationCampaign, address proxyDonationConversionHandler, address proxyDonationLogicHandler, address contractor) external
Function to emit event every time someone starts new Donation campaign.
- Parameters:
proxyDonationCampaign
- is the address of TwoKeyDonationCampaign proxy deployed by TwoKeyFactoryproxyDonationConversionHandler
- is the address of TwoKeyDonationConversionHandler proxy deployed by TwoKeyFactoryproxyDonationLogicHandler
- is the address of TwoKeyDonationLogicHandler proxy deployed by TwoKeyFactorycontractor
- address
ethereumOf
function ethereumOf(address me) public view returns (address)
Function to determine ethereum address of plasma address.
- Parameters:
me
- is the plasma address of the user- Returns:
- ethereum address
executed
function executed(address _campaignAddress, address _converterPlasmaAddress, uint _conversionId) external
Function to emit event every time conversion gets executed.
- Modifiers:
- onlyAllowedContracts
- Parameters:
_campaignAddress
- is the main campaign contract address_converterPlasmaAddress
- is the address of converter plasma_conversionId
- is the ID of conversion, unique per campaign
executedV1
function executedV1(address _campaignAddress, address _converterPlasmaAddress, uint _conversionId, uint tokens) external
Function to emit event every time conversion gets executed.
- Modifiers:
- onlyAllowedContracts
- Parameters:
_campaignAddress
- is the main campaign contract address_converterPlasmaAddress
- is the address of converter plasma_conversionId
- is the ID of conversion, unique per campaigntokens
- uint
getTwoKeyDefaultIntegratorFeeFromAdmin
function getTwoKeyDefaultIntegratorFeeFromAdmin() public view returns (uint)
In default TwoKeyAdmin will be moderator and his fee percentage per conversion is predefined.
- Returns:
- uint
getTwoKeyDefaultNetworkTaxPercent
function getTwoKeyDefaultNetworkTaxPercent() public view returns (uint)
Function to get default network tax percentage.
- Returns:
- uint
isAddressMaintainer
function isAddressMaintainer(address _maintainer) public view returns (bool)
Address to check if an address is maintainer in TwoKeyMaintainersRegistry.
- Parameters:
_maintainer
- is the address we're checking this for- Returns:
- bool
joined
function joined(address _campaign, address _from, address _to) external
This function updates values in TwoKeyRegistry contract, Function to emit created event every time someone has joined to campaign.
- Modifiers:
- onlyAllowedContracts
- Parameters:
_campaign
- is the address of the deployed campaign_from
- is the address of the referrer_to
- is the address of person who has joined
plasmaOf
function plasmaOf(address me) public view returns (address)
Function to check adequate plasma address for submitted eth address.
- Parameters:
me
- is the ethereum address we request corresponding plasma address for- Returns:
- address
priceUpdated
function priceUpdated(bytes32 _currency, uint _newRate, uint _timestamp, address _updater) external
Function which will emit event PriceUpdated every time that happens under TwoKeyExchangeRateContract.
- Parameters:
_currency
- is the hexed string of currency name_newRate
- is the new rate_timestamp
- is the time of updating_updater
- is the maintainer address which performed this call
rejected
function rejected(address _campaign, address _converter) external
- Modifiers:
- onlyAllowedContracts
- Parameters:
_campaign
- address_converter
- address
rewarded
function rewarded(address _campaign, address _to, uint256 _amount) external
Function to emit created event every time bounty is distributed between influencers.
- Modifiers:
- onlyAllowedContracts
- Parameters:
_campaign
- is the address of the deployed campaign_to
- is the reward receiver_amount
- is the reward amount
setInitialParams
function setInitialParams(address _twoKeySingletonesRegistry, address _proxyStorage) external
Function to set initial params in the contract.
- Parameters:
_twoKeySingletonesRegistry
- is the address of TWO_KEY_SINGLETON_REGISTRY contract_proxyStorage
- is the address of proxy of storage contract
userRegistered
function userRegistered(string _name, address _address, string _fullName, string _email, string _username_walletName) external
Function to emit event every time user is registered.
- Parameters:
_name
- is the name of the user_address
- is the address of the user_fullName
- is the full user name_email
- is users email_username_walletName
- is = concat(username,'_',walletName)