IStandardGovernor
Inherits: IBatchGovernor
Author: M^0 Labs
Functions
sendProposalFeeToVault
Sends the proposal fee for proposal proposalId
to the vault, if it is Defeated or Expired.
Parameters
Name | Type | Description |
---|---|---|
|
| The unique identifier of the proposal. |
setCashToken
Set the cash token and proposal fee to be used to create proposals going forward.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the new cash token. |
|
| The amount of cash token required onwards to create proposals. |
addToList
One of the valid proposals. Adds account
to list
at the Registrar.
Parameters
Name | Type | Description |
---|---|---|
|
| The key for some list. |
|
| The address of some account to be added. |
removeFromList
One of the valid proposals. Removes account
to list
at the Registrar.
Parameters
Name | Type | Description |
---|---|---|
|
| The key for some list. |
|
| The address of some account to be removed. |
removeFromAndAddToList
One of the valid proposals. Removes accountToRemove
and adds accountToAdd
to list
at the Registrar.
Parameters
Name | Type | Description |
---|---|---|
|
| The key for some list. |
|
| The address of some account to be removed. |
|
| The address of some account to be added. |
setKey
One of the valid proposals. Sets key
to value
at the Registrar.
Parameters
Name | Type | Description |
---|---|---|
|
| Some key. |
|
| Some value. |
setProposalFee
One of the valid proposals. Sets the proposal fee of the Standard Governor.
Parameters
Name | Type | Description |
---|---|---|
|
| The new proposal fee. |
proposalFee
Returns the required amount of cashToken it costs an account to create a proposal.
getProposal
Returns all the proposal details for a proposal with identifier proposalId
.
Parameters
Name | Type | Description |
---|---|---|
|
| The unique identifier of the proposal. |
Returns
Name | Type | Description |
---|---|---|
|
| The first clock value when voting on the proposal is allowed. |
|
| The last clock value when voting on the proposal is allowed. |
|
| The state of the proposal. |
|
| The amount of votes cast against the proposal. |
|
| The amount of votes cast for the proposal. |
|
| The address of the account that created the proposal. |
|
| The number of votes required to meet quorum. |
getProposalFee
Returns the proposal fee information.
Parameters
Name | Type | Description |
---|---|---|
|
| The unique identifier of the proposal. |
Returns
Name | Type | Description |
---|---|---|
|
| The address of the cash token for this particular proposal fee. |
|
| The amount of cash token of the proposal fee. |
maxTotalZeroRewardPerActiveEpoch
Returns the maximum amount of Zero Token that can be rewarded to all vote casters per active epoch.
numberOfProposalsAt
Returns the number of proposals at epoch epoch
.
Parameters
Name | Type | Description |
---|---|---|
|
| The epoch as a clock value. |
Returns
Name | Type | Description |
---|---|---|
|
| The number of proposals at epoch |
numberOfProposalsVotedOnAt
Returns the number of proposals that were voted on at epoch
.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of some account. |
|
| The epoch as a clock value. |
Returns
Name | Type | Description |
---|---|---|
|
| The number of proposals at |
hasVotedOnAllProposals
Returns whether voter
has voted on all proposals in epoch
.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of some account. |
|
| The epoch as a clock value. |
Returns
Name | Type | Description |
---|---|---|
|
| Whether |
cashToken
Returns the address of the Cash Token.
emergencyGovernor
Returns the address of the Emergency Governor.
registrar
Returns the address of the Registrar.
vault
Returns the address of the Vault.
zeroGovernor
Returns the address of the Zero Governor.
zeroToken
Returns the address of the Zero Token.
Events
CashTokenSet
Emitted when the cash token is set to cashToken
.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the cash token taking effect. |
HasVotedOnAllProposals
Emitted when voter
has voted on all the proposals in the current epoch currentEpoch
.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the account voting. |
|
| The current epoch number as a clock value. |
ProposalFeeSentToVault
Emitted when the proposal fee for the proposal, with identifier proposalFee
, is sent to the vault.
Parameters
Name | Type | Description |
---|---|---|
|
| The unique identifier of the proposal. |
|
| The address of the cash token for this particular proposal fee. |
|
| The amount of cash token of the proposal fee. |
ProposalFeeSet
Emitted when the proposal fee is set to proposalFee
.
Parameters
Name | Type | Description |
---|---|---|
|
| The amount of cash token required onwards to create proposals. |
Errors
FeeNotDestinedForVault
Revert message when the proposal fee for a yet defeated or yet expired proposal is trying to be moved.
Parameters
Name | Type | Description |
---|---|---|
|
| The current state of the proposal. |
InvalidCashTokenAddress
Revert message when the Cash Token specified in the constructor is address(0).
InvalidEmergencyGovernorAddress
Revert message when the Emergency Governor specified in the constructor is address(0).
InvalidRegistrarAddress
Revert message when the Registrar specified in the constructor is address(0).
InvalidVaultAddress
Revert message when the Vault specified in the constructor is address(0).
InvalidZeroGovernorAddress
Revert message when the Zero Governor specified in the constructor is address(0).
InvalidZeroTokenAddress
Revert message when the Zero Token specified in the constructor is address(0).
NoFeeToSend
Revert message when proposal fee trying to be moved to the vault is 0.
NotSelfOrEmergencyGovernor
Revert message when the caller is not this contract itself nor the Emergency Governor.
NotZeroGovernor
Revert message when the caller is not the Zero Governor.
TransferFailed
Revert message when a token transfer, from this contract, fails.
TransferFromFailed
Revert message when a token transferFrom fails.