UpgradeDelegator

View Source: moc-governance/contracts/Upgradeability/UpgradeDelegator.sol

↗ Extends: Governed ↘ Derived Contracts: MockUpgradeDelegator

UpgradeDelegator - version: 0.1.12

Dispatches to the proxyAdmin any call made through the governance systemAdapter between our governance system and the zeppelinOS proxyAdmin. This is needed to be able to upgrade governance through the same system

Contract Members

Constants & Variables

contract ProxyAdmin public proxyAdmin;

Functions

initialize

Initialize the contract with the basic settingsThis initialize replaces the constructor but it is not called automatically. It is necessary because of the upgradeability of the contracts

function initialize(IGovernor _governor, ProxyAdmin _proxyAdmin) public nonpayable initializer 

Arguments

getProxyImplementation

Returns the current implementation of a proxy. This is needed because only the proxy admin can query it.

function getProxyImplementation(AdminUpgradeabilityProxy proxy) public view
returns(address)

Returns

The address of the current implementation of the proxy.

Arguments

getProxyAdmin

Returns the admin of a proxy. Only the admin can query it.

function getProxyAdmin(AdminUpgradeabilityProxy proxy) public view
returns(address)

Returns

The address of the current admin of the proxy.

Arguments

changeProxyAdmin

Changes the admin of a proxy.

function changeProxyAdmin(AdminUpgradeabilityProxy proxy, address newAdmin) public nonpayable onlyAuthorizedChanger 

Arguments

upgrade

Upgrades a proxy to the newest implementation of a contract.

function upgrade(AdminUpgradeabilityProxy proxy, address implementation) public nonpayable onlyAuthorizedChanger 

Arguments

upgradeAndCall

Upgrades a proxy to the newest implementation of a contract and forwards a function call to it. This is useful to initialize the proxied contract.

function upgradeAndCall(AdminUpgradeabilityProxy proxy, address implementation, bytes data) public payable onlyAuthorizedChanger 

Arguments

Last updated