BaseImmutableAdminUpgradeabilityProxy
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.
_admin
constructor
Constructor.
Parameters
admin_
address
The address of the admin
ifAdmin
admin
Return the admin address
Return Values
[0]
address
The address of the proxy admin.
implementation
Return the implementation address
Return Values
[0]
address
The address of the implementation.
upgradeTo
Upgrade the backing implementation of the proxy.
Only the admin can call this function.
Parameters
newImplementation
address
The address of the new implementation.
upgradeToAndCall
Upgrade the backing implementation of the proxy and call a function on the new implementation.
This is useful to initialize the proxied contract.
Parameters
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.
_willFallback
Only fall back when the sender is not the admin.