IZeroGovernor
Inherits: IThresholdGovernor
Author: M^0 Labs
Functions
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
newCashToken
address
The address of the new cash token.
newProposalFee
uint256
The amount of cash token required onwards to create Standard Governor proposals.
setEmergencyProposalThresholdRatio
One of the valid proposals. Sets the threshold ratio for Emergency Governor proposals.
Parameters
newThresholdRatio
uint16
The new threshold ratio.
setZeroProposalThresholdRatio
One of the valid proposals. Sets the threshold ratio for this governor's proposals.
Parameters
newThresholdRatio
uint16
The new threshold ratio.
isAllowedCashToken
Returns whether token
is an allowed Cash Token of the system, as a parameter in setCashToken proposal.
Parameters
token
address
The address of some token.
Returns
<none>
bool
Whether token
is an allowed Cash Token.
emergencyGovernor
Returns the address of the Emergency Governor.
emergencyGovernorDeployer
Returns the address of the Emergency Governor Deployer.
powerTokenDeployer
Returns the address of the Power Token Deployer.
standardGovernor
Returns the address of the Standard Governor.
standardGovernorDeployer
Returns the address of the Standard Governor Deployer.
Events
AllowedCashTokensSet
Emitted upon contract deployment, once the set of allowed cash tokens is finalized.
Parameters
allowedCashTokens
address[]
An array of addressed that are allowed as cash tokens.
ResetExecuted
Emitted upon a Reset, resulting in a new Standard Governor, Emergency Governor, and Power Token.
Parameters
bootstrapToken
address
The address of token (Zero Token or old Power Token), that bootstraps the reset.
standardGovernor
address
The address of the new Standard Governor.
emergencyGovernor
address
The address of the new Emergency Governor.
powerToken
address
The address of the new Power Token.
Errors
InvalidCashToken
Revert message when the Cash Token specified is not in the allowed set.
InvalidCashTokenAddress
Revert message when the Cash Token specified in the constructor is address(0).
InvalidEmergencyGovernorDeployerAddress
Revert message when the Emergency Governor Deployer specified in the constructor is address(0).
InvalidPowerTokenDeployerAddress
Revert message when the Power Token Deployer specified in the constructor is address(0).
InvalidStandardGovernorDeployerAddress
Revert message when the Standard Governor Deployer specified in the constructor is address(0).
NoAllowedCashTokens
Revert message when the set of allowed cash tokens specified in the constructor is empty.
UnexpectedPowerTokenDeployed
Revert message when the address of the deployed Power Token differs fro what was expected.
Parameters
expected
address
The expected address of the deployed Power Token.
deployed
address
The actual address of the deployed Power Token.
UnexpectedStandardGovernorDeployed
Revert message when the address of the deployed Standard Governor differs fro what was expected.
Parameters
expected
address
The expected address of the deployed Standard Governor.
deployed
address
The actual address of the deployed Standard Governor.