UpgraderTemplate
View Source: moc-governance/contracts/ChangersTemplates/UpgraderTemplate.sol
↗ Extends: ChangeContract ↘ Derived Contracts: MoCBProxManagerUpdater, MockUpgraderTemplate
UpgraderTemplate - version: 0.1.12
This contract is a ChangeContract intended to be used when upgrading any contract upgradeable through the zos-lib upgradeability system. This doesn't initialize the upgraded contract, that should be done extending this one or taking it as a guide
Contract Members
Constants & Variables
Functions
Constructor
Arguments
_proxy
AdminUpgradeabilityProxy
Address of the proxy to be upgraded
_upgradeDelegator
UpgradeDelegator
Address of the upgradeDelegator in charge of that proxy
_newImplementation
address
Address of the contract the proxy will delegate to
execute
⤾ overrides ChangeContract.execute
Execute the changes.Should be called by the governor, but this contract does not check that explicitly because it is not its responsability in the current architecture IMPORTANT: This function should not be overriden, you should only redefine the _beforeUpgrade and _afterUpgrade to use this template
Arguments
_upgrade
Upgrade the proxy to the newImplementationIMPORTANT: This function should not be overriden
Arguments
_beforeUpgrade
Intended to prepare the system for the upgradeThis function can be overriden by child changers to upgrade contracts that require some preparation before the upgrade
Arguments
_afterUpgrade
Intended to do the final tweaks after the upgrade, for example initialize the contractThis function can be overriden by child changers to upgrade contracts that require some changes after the upgrade
Arguments
Last updated