TwoKeySingletonesRegistry
contract TwoKeySingletonesRegistry
Index
Reference
Events
ProxiesDeployed
event ProxiesDeployed(address logicProxy, address storageProxy)
- Parameters:
logicProxy
- addressstorageProxy
- 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 contractcontractAddress
- 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
- stringversion
- representing the version name of the new implementation to be registeredimplementation
- 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
- stringcontractStorageName
- stringcontractLogicImplementation
- addresscontractStorageImplementation
- addressversion
- string
createProxy
function createProxy(string contractName, string contractNameStorage, string version) public
Creates an upgradeable proxy for both Storage and Logic.
- Modifiers:
- onlyMaintainer
- Parameters:
contractName
- stringcontractNameStorage
- stringversion
- 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 contractversion
- 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
- stringversion
- 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 contractversion
- is the new version