ProxyAdminWithDeputy

ProxyAdminWithDeputy

Based on ProxyAdmin, an auxiliary contract in OpenZeppelin's upgradeability approach meant to act as the admin of a TransparentUpgradeableProxy. This variant allows an additional actor, the "deputy", to perform upgrades, which originally can only be performed by the ProxyAdmin's owner. See OpenZeppelin's documentation for TransparentUpgradeableProxy for more details on why a ProxyAdmin is recommended.

deputy

address deputy

DeputyUpdated

event DeputyUpdated(address previousDeputy, address newDeputy)

onlyOwnerOrDeputy

modifier onlyOwnerOrDeputy()

constructor

constructor(contract StakerGovernor dao, address _deputy) public

setDeputy

function setDeputy(address newDeputy) external

upgrade

function upgrade(contract TransparentUpgradeableProxy proxy, address implementation) public virtual

Upgrades proxy to implementation. This contract must be the admin of proxy, and the caller must be this contract's owner or the deputy.

upgradeAndCall

function upgradeAndCall(contract TransparentUpgradeableProxy proxy, address implementation, bytes data) public payable virtual

Upgrades proxy to implementation and calls a function on the new implementation. This contract must be the admin of proxy, and the caller must be this contract's owner or the deputy.

_setDeputy

function _setDeputy(address newDeputy) internal

_checkCallerIsOwnerOrDeputy

function _checkCallerIsOwnerOrDeputy() internal view

Last updated