ZeroGovernor
Inherits: IZeroGovernor, ThresholdGovernor
Author: M^0 Labs
State Variables
_MAX_TOTAL_ZERO_REWARD_PER_ACTIVE_EPOCH
The maximum number of Zero tokens that can be rewarded per active epoch.
emergencyGovernorDeployer
Returns the address of the Emergency Governor Deployer.
powerTokenDeployer
Returns the address of the Power Token Deployer.
standardGovernorDeployer
Returns the address of the Standard Governor Deployer.
_allowedCashTokens
The set of allowed cash tokens.
Functions
constructor
Construct a new ZeroGovernor contract.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the token used to vote. |
|
| The address of the Emergency Governor Deployer contract. |
|
| The address of the Power Token Deployer contract. |
|
| The address of the Standard Governor Deployer contract. |
|
| The address of the token that bootstraps the reset. |
|
| The proposal fee for the Standard Governor. |
|
| The threshold ratio for the Emergency Governor. |
|
| The threshold ratio for the Zero Governor. |
|
| The set of allowed cash tokens. |
resetToPowerHolders
One of the valid proposals. Reset the Standard Governor, Emergency Governor, and Power Token to the Power Token holders. This would be used by Zero Token holders in the event that inflation is soon to result in Power Token overflowing, and/or there is a loss of faith in the state of either the Standard Governor or Emergency Governor.
resetToZeroHolders
One of the valid proposals. Reset the Standard Governor, Emergency Governor, and Power Token to the ZeroToken holders. This would be used by Zero Token holders if they no longer have faith in the current set of PowerToken holders and/or the state of either the Standard Governor or Emergency Governor.
setCashToken
One of the valid proposals. Sets the Cash Token of the system.
Parameters
Name | Type | Description |
---|---|---|
|
| |
|
|
setEmergencyProposalThresholdRatio
One of the valid proposals. Sets the threshold ratio for Emergency Governor proposals.
Parameters
Name | Type | Description |
---|---|---|
|
|
setZeroProposalThresholdRatio
One of the valid proposals. Sets the threshold ratio for this governor's proposals.
Parameters
Name | Type | Description |
---|---|---|
|
|
isAllowedCashToken
Returns whether token
is an allowed Cash Token of the system, as a parameter in setCashToken proposal.
Parameters
Name | Type | Description |
---|---|---|
|
|
Returns
Name | Type | Description |
---|---|---|
|
| Whether |
emergencyGovernor
Returns the address of the Emergency Governor.
standardGovernor
Returns the address of the Standard Governor.
_deployEphemeralContracts
Deploys the ephemeral standardGovernor
, emergencyGovernor
, and powerToken
contracts.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the Emergency Governor Deployer contract. |
|
| The address of the Power Token Deployer contract. |
|
| The address of the Standard Governor Deployer contract. |
|
| The address of a token to bootstrap the new Power Token. |
|
| The address of the Cash Token contract. |
|
| The threshold ratio for the Emergency Governor. |
|
| The proposal fee for the Standard Governor. |
Returns
Name | Type | Description |
---|---|---|
|
| The address of the deployed Standard Governor contract. |
|
| The address of the deployed Emergency Governor contract. |
|
| The address of the deployed Power Token contract. |
_resetContracts
*Redeploy the ephemeral standardGovernor
, emergencyGovernor
, and powerToken
contracts, where:
the cash token is the same cash token in the existing
standardGovernor
the
emergencyGovernor
threshold ratio is the same threshold ratio in the existingemergencyGovernor
the
standardGovernor
proposal fee is the same proposal fee in the existingstandardGovernor
*
Parameters
Name | Type | Description |
---|---|---|
|
| The token to bootstrap the |
_revertIfInvalidCalldata
All proposals target this contract itself, and must call one of the listed functions to be valid.
Parameters
Name | Type | Description |
---|---|---|
|
| The call data to check. |