UpgradeabilityProxyFactory
contract UpgradeabilityProxyFactory
Factory to create upgradeability proxies.
Reference
Events
ProxyCreated
event ProxyCreated(address proxy)
Emitted when a new proxy is created.
- Parameters:
proxy
- Address of the created proxy.
Functions
_createProxy
function _createProxy(address implementation) internal returns (AdminUpgradeabilityProxy)
Internal function to create an upgradeable proxy.
- Parameters:
implementation
- Address of the initial implementation.- Returns:
- Address of the new proxy.
createProxy
function createProxy(address owner, address implementation) public returns (AdminUpgradeabilityProxy)
Creates an upgradeability proxy with an initial implementation.
- Parameters:
owner
- Proxy owner.implementation
- Address of the initial implementation.- Returns:
- Address of the new proxy.
createProxyAndCall
function createProxyAndCall(address owner, address implementation, bytes data) public payable returns (AdminUpgradeabilityProxy)
Creates an upgradeability proxy with an initial implementation and calls it. This is useful to initialize the proxied contract.
- Parameters:
owner
- Proxy owner.implementation
- Address of the initial implementation.data
- Data to send as msg.data in the low level call. It should include the signature and the parameters of the function to be called, as described in https://solidity.readthedocs.io/en/develop/abi-spec.html#function-selector-and-argument-encoding.- Returns:
- Address of the new proxy.