This contract combines an upgradeability proxy with an authorization mechanism for administrative tasks.
_The admin role is stored in an immutable, which helps saving transactions costs All external functions in this contract must be guarded by the ifAdmin
modifier. See ethereum/solidity#3864 for a Solidity feature proposal that would enable this to be done automatically.
Constructor.
Name | Type | Description |
---|---|---|
Return the admin address
Return the implementation address
Upgrade the backing implementation of the proxy.
Only the admin can call this function.
Upgrade the backing implementation of the proxy and call a function on the new implementation.
This is useful to initialize the proxied contract.
Only fall back when the sender is not the admin.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
admin_
address
The address of the admin
[0]
address
The address of the proxy admin.
[0]
address
The address of the implementation.
newImplementation
address
The address of the new implementation.
newImplementation
address
The address of the new implementation.
data
bytes
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/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.