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

address _admin

constructor

constructor(address admin_) public

Constructor.

Parameters

ifAdmin

modifier ifAdmin()

admin

function admin() external returns (address)

Return the admin address

Return Values

implementation

function implementation() external returns (address)

Return the implementation address

Return Values

upgradeTo

function upgradeTo(address newImplementation) external

Upgrade the backing implementation of the proxy.

Only the admin can call this function.

Parameters

upgradeToAndCall

function upgradeToAndCall(address newImplementation, bytes data) external payable

Upgrade the backing implementation of the proxy and call a function on the new implementation.

This is useful to initialize the proxied contract.

Parameters

_willFallback

function _willFallback() internal virtual

Only fall back when the sender is not the admin.