UpgradeabilityProxy
contract UpgradeabilityProxy
is Proxy
This contract implements a proxy that allows to change the implementation address to which it will delegate. Such a change is called an implementation upgrade.
Reference
Events
Upgraded
event Upgraded(address implementation)
Emitted when the implementation is upgraded.
- Parameters:
implementation
- Address of the new implementation.
Functions
UpgradeabilityProxy
function UpgradeabilityProxy(address _implementation) public
Contract constructor.
- Parameters:
_implementation
- Address of the initial implementation.
_implementation
function _implementation() internal view returns (address)
Returns the current implementation.
- Returns:
- Address of the current implementation
_upgradeTo
function _upgradeTo(address newImplementation) internal
Upgrades the proxy to a new implementation.
- Parameters:
newImplementation
- Address of the new implementation.