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

TwoKeyMaintainersRegistry

contract TwoKeyMaintainersRegistry

is Upgradeable

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

Index

  • addMaintainer
  • addMaintainers
  • decrementNumberOfActiveMaintainers
  • getAddressFromTwoKeySingletonRegistry
  • getAllMaintainers
  • getMaintainerPerId
  • getNumberOfActiveMaintainers
  • getNumberOfMaintainers
  • incrementNumberOfActiveMaintainers
  • incrementNumberOfMaintainers
  • isMaintainer
  • onlyMaintainer
  • onlyTwoKeyAdmin
  • removeMaintainer
  • removeMaintainers
  • setInitialParams

Reference

Functions

  • addMaintainer

    function addMaintainer(address _maintainer) internal

    Function which will add maintainer.

    Parameters:
    _maintainer - is the address of new maintainer we're adding
  • addMaintainers

    function addMaintainers(address[] _maintainers) public

    Only twoKeyAdmin contract is eligible to mutate state of maintainers, Function which can add new maintainers, in general it's array because this supports adding multiple addresses in 1 trnx.

    Parameters:
    _maintainers - is the array of maintainer addresses
  • decrementNumberOfActiveMaintainers

    function decrementNumberOfActiveMaintainers() internal
  • getAddressFromTwoKeySingletonRegistry

    function getAddressFromTwoKeySingletonRegistry(string contractName) internal view returns (address)
    Parameters:
    contractName - string
    Returns:
    address
  • getAllMaintainers

    function getAllMaintainers() public view returns (address[])

    Function to get all maintainers set DURING CAMPAIGN CREATION.

    Returns:
    address[]
  • getMaintainerPerId

    function getMaintainerPerId(uint _id) public view returns (address)
    Parameters:
    _id - uint
    Returns:
    address
  • getNumberOfActiveMaintainers

    function getNumberOfActiveMaintainers() public view returns (uint)
    Returns:
    uint
  • getNumberOfMaintainers

    function getNumberOfMaintainers() public view returns (uint)
    Returns:
    uint
  • incrementNumberOfActiveMaintainers

    function incrementNumberOfActiveMaintainers() internal
  • incrementNumberOfMaintainers

    function incrementNumberOfMaintainers() internal
  • isMaintainer

    function isMaintainer(address _address) internal view returns (bool)

    Function to check if address is maintainer.

    Parameters:
    _address - is the address we're checking if it's maintainer or not
    Returns:
    bool
  • onlyMaintainer

    function onlyMaintainer(address _sender) public view returns (bool)

    Function which will determine if address is maintainer.

    Parameters:
    _sender - address
    Returns:
    bool
  • onlyTwoKeyAdmin

    function onlyTwoKeyAdmin(address sender) public view returns (bool)

    Modifier to restrict calling the method to anyone but twoKeyAdmin.

    Parameters:
    sender - address
    Returns:
    bool
  • removeMaintainer

    function removeMaintainer(address _maintainer) internal

    Function which will remove maintainer.

    Parameters:
    _maintainer - is the address of the maintainer we're removing
  • removeMaintainers

    function removeMaintainers(address[] _maintainers) public

    Only twoKeyAdmin contract is eligible to mutate state of maintainers, Function which can remove some maintainers, in general it's array because this supports adding multiple addresses in 1 trnx.

    Parameters:
    _maintainers - is the array of maintainer addresses
  • setInitialParams

    function setInitialParams(address _twoKeySingletonRegistry, address _proxyStorage, address[] _maintainers) public

    Function which can be called only once, and is used as replacement for a constructor.

    Parameters:
    _twoKeySingletonRegistry - is the address of TWO_KEY_SINGLETON_REGISTRY contract
    _proxyStorage - is the address of proxy of storage contract
    _maintainers - is the array of initial maintainers we'll kick off contract with
← TwoKeyFactoryTwoKeyPlasmaEvents →
Copyright © 2019 2key.network