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

TwoKeyAdmin

contract TwoKeyAdmin

is Upgradeable, ITwoKeySingletonUtils

Source: contracts/2key/singleton-contracts/TwoKeyAdmin.sol

Index

  • addNameToReg
  • fallback
  • freezeTransfersInEconomy
  • getDefaultIntegratorFeePercent
  • getDefaultNetworkTaxPercent
  • getTwoKeyRewardsReleaseDate
  • getTwoKeyTokenRate
  • getUint
  • onlyTwoKeyCongress
  • onlyTwoKeyUpgradableExchange
  • setInitialParams
  • setUint
  • transfer2KeyTokens
  • transferEtherByAdmins
  • unfreezeTransfersInEconomy

Reference

Modifiers

  • onlyTwoKeyCongress

    modifier onlyTwoKeyCongress()

    Modifier which throws if caller is not TwoKeyCongress.

  • onlyTwoKeyUpgradableExchange

    modifier onlyTwoKeyUpgradableExchange()

    Modifier will revert if caller is not TwoKeyUpgradableExchange.

Functions

  • addNameToReg

    function addNameToReg(string _name, address _addr, string _fullName, string _email, bytes _signature) external

    Function to add/update name - address pair from twoKeyAdmin.

    Parameters:
    _name - is name of user
    _addr - is address of user
    _fullName - is full name of the user
    _email - is the email of the user
    _signature - is the signature generated on client side
  • fallback

    function () external payable

    Fallback function.

  • freezeTransfersInEconomy

    function freezeTransfersInEconomy() external

    Function to freeze all transfers for 2KEY token.

    Modifiers:
    onlyTwoKeyCongress
  • getDefaultIntegratorFeePercent

    function getDefaultIntegratorFeePercent() public view returns (uint)

    Getter function for TwoKeyIntegratorDefaultFeePercent.

    Returns:
    uint
  • getDefaultNetworkTaxPercent

    function getDefaultNetworkTaxPercent() public view returns (uint)

    Getter function for TwoKeyNetworkTaxPercent.

    Returns:
    uint
  • getTwoKeyRewardsReleaseDate

    function getTwoKeyRewardsReleaseDate() external view returns (uint)

    Getter function for TwoKeyRewardsReleaseDate.

    Returns:
    uint
  • getTwoKeyTokenRate

    function getTwoKeyTokenRate() public view returns (uint)

    Getter function for TwoKeyTokenRate.

    Returns:
    uint
  • getUint

    function getUint(string key) internal view returns (uint)

    Getter for all integers we'd like to store.

    Parameters:
    key - is the key (var name)
    Returns:
    uint
  • setInitialParams

    function setInitialParams(address _twoKeySingletonRegistry, address _proxyStorageContract, address _twoKeyCongress, address _economy, uint _twoKeyTokenReleaseDate) external

    This function can be called only once, which will be done immediately after deployment., Function to set initial parameters in the contract including singletones.

    Parameters:
    _twoKeySingletonRegistry - is the singletons registry contract address
    _proxyStorageContract - is the address of proxy for storage for this contract
    _twoKeyCongress - is the address of TwoKeyCongress
    _economy - is the address of TwoKeyEconomy
    _twoKeyTokenReleaseDate - uint
  • setUint

    function setUint(string key, uint value) internal

    Setter for all integers we'd like to store.

    Parameters:
    key - is the key (var name)
    value - is the value of integer we'd like to store
  • transfer2KeyTokens

    function transfer2KeyTokens(address _to, uint256 _amount) public returns (bool)

    Only TwoKeyCongress can call this function, Function to transfer 2key tokens.

    Modifiers:
    onlyTwoKeyCongress
    Parameters:
    _to - is tokens receiver
    _amount - is the amount of tokens to be transferred
    Returns:
    bool
  • transferEtherByAdmins

    function transferEtherByAdmins(address to, uint256 amount) external

    We're recurring to address different from address 0, Function where only TwoKeyCongress can transfer ether to an address.

    Modifiers:
    onlyTwoKeyCongress
    Parameters:
    to - receiver's address
    amount - of ether to be transferred
  • unfreezeTransfersInEconomy

    function unfreezeTransfersInEconomy() external

    Function to unfreeze all transfers for 2KEY token.

    Modifiers:
    onlyTwoKeyCongress
← StandardTokenModifiedTwoKeyBaseReputationRegistry →
Copyright © 2019 2key.network