TwoKey documentation

TwoKey documentation

  • Docs

›2KEY / SINGLETON-CONTRACTS

2KEY

  • Migrations
  • Ownable
  • TwoKeyConversionStates
  • TwoKeyConverterStates
  • TwoKeyTypes
  • UpgradabilityProxyAcquisition

2KEY / ACQUISITION-CAMPAIGN-CONTRACTS

  • TwoKeyAcquisitionCampaignERC20
  • TwoKeyAcquisitionLogicHandler
  • TwoKeyConversionHandler
  • TwoKeyPurchasesHandler

2KEY / CAMPAIGN-MUTUAL-CONTRACTS

  • ArcERC20
  • TwoKeyCampaign
  • TwoKeyCampaignConversionHandler
  • TwoKeyCampaignIncentiveModels
  • TwoKeyCampaignLogicHandler

2KEY / DONATION-CAMPAIGN-CONTRACTS

  • InvoiceTokenERC20
  • TwoKeyDonationCampaign
  • TwoKeyDonationCampaignType
  • TwoKeyDonationConversionHandler
  • TwoKeyDonationLogicHandler

2KEY / ERC20

  • ERC20

2KEY / INTERFACES

  • IBancorContract
  • IERC20
  • IGetImplementation
  • IHandleCampaignDeployment
  • IKyberNetworkProxy
  • IMaintainingPattern
  • IStructuredStorage
  • ITwoKeyAcquisitionCampaignERC20
  • ITwoKeyAcquisitionLogicHandler
  • ITwoKeyAdmin
  • ITwoKeyBaseReputationRegistry
  • ITwoKeyCampaign
  • ITwoKeyCampaignGetReferrers
  • ITwoKeyCampaignPublicAddresses
  • ITwoKeyCampaignValidator
  • ITwoKeyConversionHandler
  • ITwoKeyConversionHandlerGetConverterState
  • ITwoKeyDonationCampaign
  • ITwoKeyDonationCampaignFetchAddresses
  • ITwoKeyDonationConversionHandler
  • ITwoKeyDonationLogicHandler
  • ITwoKeyEventSource
  • ITwoKeyEventSourceEvents
  • ITwoKeyExchangeRateContract
  • ITwoKeyMaintainersRegistry
  • ITwoKeyPlasmaEvents
  • ITwoKeyPlasmaRegistry
  • ITwoKeyPurchasesHandler
  • ITwoKeyReg
  • ITwoKeyRegistry
  • ITwoKeyRegistryEvents
  • ITwoKeySingletoneAddressStorage
  • ITwoKeySingletoneRegistryFetchAddress
  • ITwoKeySingletonesRegistry
  • ITwoKeyWeightedVoteContract
  • IUpgradableExchange

2KEY / INTERFACES / STORAGE-CONTRACTS

  • ITwoKeyAdminStorage
  • ITwoKeyBaseReputationRegistryStorage
  • ITwoKeyCampaignValidatorStorage
  • ITwoKeyCommunityTokenPoolStorage
  • ITwoKeyDeepFreezeTokenPoolStorage
  • ITwoKeyEventSourceStorage
  • ITwoKeyExchangeRateContractStorage
  • ITwoKeyFactoryStorage
  • ITwoKeyLongTermTokenPoolStorage
  • ITwoKeyMaintainersRegistryStorage
  • ITwoKeyPlasmaEventsStorage
  • ITwoKeyPlasmaMaintainersRegistryStorage
  • ITwoKeyPlasmaRegistryStorage
  • ITwoKeyRegistryStorage
  • ITwoKeySignatureValidatorStorage
  • ITwoKeyUpgradableExchangeStorage

2KEY / LIBRARIES

  • Call
  • GetCode
  • IncentiveModels
  • SafeMath
  • Utils

2KEY / SINGLETON-CONTRACTS

  • ITwoKeySingletonUtils
  • StandardTokenModified
  • TwoKeyAdmin
  • TwoKeyBaseReputationRegistry
  • TwoKeyCampaignValidator
  • TwoKeyCongress
  • TwoKeyEconomy
  • TwoKeyEventSource
  • TwoKeyExchangeRateContract
  • TwoKeyFactory
  • TwoKeyMaintainersRegistry
  • TwoKeyPlasmaEvents
  • TwoKeyPlasmaMaintainersRegistry
  • TwoKeyPlasmaRegistry
  • TwoKeyPlasmaSingletoneRegistry
  • TwoKeyRegistry
  • TwoKeySignatureValidator
  • TwoKeySingletonesRegistry
  • TwoKeyUpgradableExchange

2KEY / SINGLETON-STORAGE-CONTRACTS

  • TwoKeyAdminStorage
  • TwoKeyBaseReputationRegistryStorage
  • TwoKeyCampaignValidatorStorage
  • TwoKeyCommunityTokenPoolStorage
  • TwoKeyDeepFreezeTokenPoolStorage
  • TwoKeyEventSourceStorage
  • TwoKeyExchangeRateStorage
  • TwoKeyFactoryStorage
  • TwoKeyLongTermTokenPoolStorage
  • TwoKeyMaintainersRegistryStorage
  • TwoKeyPlasmaEventsStorage
  • TwoKeyPlasmaMaintainersRegistryStorage
  • TwoKeyPlasmaRegistryStorage
  • TwoKeyRegistryStorage
  • TwoKeySignatureValidatorStorage
  • TwoKeyUpgradableExchangeStorage

2KEY / TOKEN-POOLS

  • TokenPool
  • TwoKeyCommunityTokenPool
  • TwoKeyDeepFreezeTokenPool
  • TwoKeyLongTermTokenPool

2KEY / UPGRADABILITY

  • Proxy
  • StructuredStorage
  • UpgradeabilityStorage
  • UpgradeabilityProxy
  • Upgradeable

2KEY / UPGRADABLE-PATTERN-CAMPAIGNS

  • ProxyCampaign
  • UpgradeabilityCampaignStorage
  • UpgradeableCampaign

TEST

  • FungibleMockToken
  • TestA
  • TestB
  • KyberNetworkTestMockContract

TwoKeyCampaignValidator

contract TwoKeyCampaignValidator

is Upgradeable, ITwoKeySingletonUtils

Source: contracts/2key/singleton-contracts/TwoKeyCampaignValidator.sol
Author: Nikola Madjarevic Created at 2/12/19

Index

  • campaign2NonSingletonHash
  • emitCreatedEvent
  • isCampaignValidated
  • onlyTwoKeyFactory
  • setInitialParams
  • validateAcquisitionCampaign
  • validateDonationCampaign

Reference

Modifiers

  • onlyTwoKeyFactory

    modifier onlyTwoKeyFactory()

Functions

  • campaign2NonSingletonHash

    function campaign2NonSingletonHash(address campaign) public view returns (string)

    Function which is serving as getter for non-singleton hash at the time of campaign creation.

    Parameters:
    campaign - is the address of strictly main campaign contract (TwoKeyAcquisitionCampaignERC20, TwoKeyDonationCampaign for now)
    Returns:
    string
  • emitCreatedEvent

    function emitCreatedEvent(address campaign) internal

    Function to emit event on TwoKeyEventSource contract.

    Parameters:
    campaign - address
  • isCampaignValidated

    function isCampaignValidated(address campaign) public view returns (bool)

    Function which will return either is or not one of the campaign contracts validated.

    Parameters:
    campaign - is any contract deployed during any campaign creation through TwoKeyFactory
    Returns:
    bool
  • setInitialParams

    function setInitialParams(address _twoKeySingletoneRegistry, address _proxyStorage) public

    Function to set initial parameters in this contract.

    Parameters:
    _twoKeySingletoneRegistry - is the address of TwoKeySingletoneRegistry contract
    _proxyStorage - is the address of proxy of storage contract
  • validateAcquisitionCampaign

    function validateAcquisitionCampaign(address campaign, string nonSingletonHash) public

    Function which will make newly created campaign validated.

    Modifiers:
    onlyTwoKeyFactory
    Parameters:
    campaign - is the address of the campaign
    nonSingletonHash - is the non singleton hash at the moment of campaign creation
  • validateDonationCampaign

    function validateDonationCampaign(address campaign, address donationConversionHandler, address donationLogicHandler, string nonSingletonHash) public

    Validates all the required stuff, if the campaign is not validated, it can't update our singletones, Function which will make newly created campaign validated.

    Modifiers:
    onlyTwoKeyFactory
    Parameters:
    campaign - is the campaign address
    donationConversionHandler - address
    donationLogicHandler - address
    nonSingletonHash - string
← TwoKeyBaseReputationRegistryTwoKeyCongress →
Copyright © 2019 2key.network