MezzGovernor

Git Source

Inherits: StateAware, Patchable, IMezzGovernor

Author: Daniel Yamagata

A base contract for governor that defines upgradeability logic and modifiers for access control

All governors are able to execute arbitrary transactions. Therefore, they are able to call the Mezz Migrator to upgrade themselves to a newer version. Specifically, the governor should call the Mezz Migrator's upgradeToNewerVersion() However, resetting to a patched version may not be possible depending on the protocol state. Therefore, a function to execute this callback is provided via 'Patchable'

State Variables

MezzGovernorStorageLocation

bytes32 private constant MezzGovernorStorageLocation =
    0x0b1a6379e7855c565527499b30056eabdaf3a2b55abb1e5da911b250c18bf800;

Functions

_getMezzGovernorStorage

function _getMezzGovernorStorage() internal pure returns (MezzGovernorStorage storage $);

constructor

constructor(address _mezzHub, address _mezzMigrator) StateAware(_mezzHub) Patchable(_mezzMigrator);

onlyMezzGovernance

Reverts if the caller is not 'this'

init

Intializes the Governor's state

Parameters

Name
Type
Description

initTreasury

address

The address of the Treasury that the Governor is in charge of

params

bytes

Bespoke abi.encoded parameters

__MezzGovernor_init

treasury

Returns the address of the treasury associated with the governor

name

Returns the name of the governor

_validateCallerIsGovernance

Reverts if the caller is not 'this'

_authorizePatch

Access control for 'resetToPatchedLatestVersion()'

Structs

MezzGovernorStorage

Last updated