ImplementationDirectory
contract ImplementationDirectory
is ImplementationProvider, Ownable
Implementation provider that stores contract implementations in a mapping.
Reference
Events
ImplementationChanged
event ImplementationChanged(string contractName, address implementation)
Emitted when the implementation of a contract is changed.
- Parameters:
contractName
- Name of the contract.implementation
- Address of the added implementation.
Functions
getImplementation
function getImplementation(string contractName) public view returns (address)
Returns the implementation address of a contract.
- Parameters:
contractName
- Name of the contract.- Returns:
- Address of the implementation.
setImplementation
function setImplementation(string contractName, address implementation) public
Sets the address of the implementation of a contract in the directory.
- Modifiers:
- onlyOwner
- Parameters:
contractName
- Name of the contract.implementation
- Address of the implementation.
unsetImplementation
function unsetImplementation(string contractName) public
Removes the address of a contract implementation from the directory.
- Modifiers:
- onlyOwner
- Parameters:
contractName
- Name of the contract.