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
_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.
fallback
function (address _implementation, bytes _data) public payable
Contract constructor.
- Parameters:
_implementation
- Address of the initial implementation._data
- Data to send as msg.data to the implementation to initialize the proxied contract. It should include the signature and the parameters of the function to be called, as described in https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. This parameter is optional, if no data is given the initialization call to proxied contract will be skipped.