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

TwoKeySingletonesRegistry

contract TwoKeySingletonesRegistry

is ITwoKeySingletonesRegistry

Source: contracts/2key/singleton-contracts/TwoKeySingletonesRegistry.sol
Author: Nikola Madjarevic

Index

  • ProxiesDeployed
  • addNonUpgradableContractToAddress
  • addVersion
  • addVersionDuringCreation
  • createProxy
  • deployProxy
  • fallback
  • getContractProxyAddress
  • getLatestContractVersion
  • getNonUpgradableContractAddress
  • getVersion
  • onlyMaintainer
  • upgradeContract

Reference

Events

  • ProxiesDeployed

    event ProxiesDeployed(address logicProxy, address storageProxy)
    Parameters:
    logicProxy - address
    storageProxy - address

Modifiers

  • onlyMaintainer

    modifier onlyMaintainer()

Functions

  • addNonUpgradableContractToAddress

    function addNonUpgradableContractToAddress(string contractName, address contractAddress) public

    Only maintainer can issue call to this method, Function to add non upgradable contract in registry of all contracts.

    Modifiers:
    onlyMaintainer
    Parameters:
    contractName - is the name of the contract
    contractAddress - is the contract address
  • addVersion

    function addVersion(string contractName, string version, address implementation) public

    Registers a new version with its implementation address.

    Modifiers:
    onlyMaintainer
    Parameters:
    contractName - string
    version - representing the version name of the new implementation to be registered
    implementation - representing the address of the new implementation to be registered
  • addVersionDuringCreation

    function addVersionDuringCreation(string contractLogicName, string contractStorageName, address contractLogicImplementation, address contractStorageImplementation, string version) public
    Modifiers:
    onlyMaintainer
    Parameters:
    contractLogicName - string
    contractStorageName - string
    contractLogicImplementation - address
    contractStorageImplementation - address
    version - string
  • createProxy

    function createProxy(string contractName, string contractNameStorage, string version) public

    Creates an upgradeable proxy for both Storage and Logic.

    Modifiers:
    onlyMaintainer
    Parameters:
    contractName - string
    contractNameStorage - string
    version - representing the first version to be set for the proxy
  • deployProxy

    function deployProxy(string contractName, string version) internal returns (address)

    Internal function to deploy proxy for the contract.

    Parameters:
    contractName - is the name of the contract
    version - is the new version
    Returns:
    address
  • fallback

    function () public

    Calling super constructor from maintaining pattern.

  • getContractProxyAddress

    function getContractProxyAddress(string _contractName) public view returns (address)

    Function to return address of proxy for specific contract.

    Parameters:
    _contractName - is the name of the contract we'd like to get proxy address
    Returns:
    is the address of the proxy for the specific contract
  • getLatestContractVersion

    function getLatestContractVersion(string contractName) public view returns (string)

    Gets the latest contract version.

    Parameters:
    contractName - is the name of the contract
    Returns:
    string representation of the last version
  • getNonUpgradableContractAddress

    function getNonUpgradableContractAddress(string contractName) public view returns (address)

    Function to get address of non-upgradable contract.

    Parameters:
    contractName - is the name of the contract
    Returns:
    address
  • getVersion

    function getVersion(string contractName, string version) public view returns (address)

    Tells the address of the implementation for a given version.

    Parameters:
    contractName - string
    version - to query the implementation of
    Returns:
    address of the implementation registered for the given version
  • upgradeContract

    function upgradeContract(string contractName, string version) public

    Function to upgrade contract to new version.

    Parameters:
    contractName - is the name of the contract
    version - is the new version
← TwoKeySignatureValidatorTwoKeyUpgradableExchange →
Copyright © 2019 2key.network