Inherits: IStandardGovernor, BatchGovernor
Author: M^0 Labs
Returns the address of the Emergency Governor.
Returns the address of the Registrar.
Returns the address of the Vault.
Returns the address of the Zero Governor.
Returns the address of the Zero Token.
Returns the maximum amount of Zero Token that can be rewarded to all vote casters per active epoch.
Returns the address of the Cash Token.
Returns the required amount of cashToken it costs an account to create a proposal.
The proposal fee info per proposal ID.
The amount of proposals per epoch.
The amount of proposals a voter has voted on per epoch.
Revert if the caller is not the Zero Governor.
Revert if the caller is not the Standard Governor nor the Emergency Governor.
Constructs a new StandardGovernor contract.
Parameters
voteToken_
address
The address of the Vote Token contract.
emergencyGovernor_
address
The address of the Emergency Governor contract.
zeroGovernor_
address
The address of the Zero Governor contract.
cashToken_
address
The address of the Cash Token contract.
registrar_
address
The address of the Registrar contract.
vault_
address
The address of the Vault contract.
zeroToken_
address
The address of the Zero Token contract.
proposalFee_
uint256
The proposal fee.
maxTotalZeroRewardPerActiveEpoch_
uint256
The maximum amount of zero tokens to reward per active epoch.
Allows the caller to execute a proposal.
Parameters
targets_
address[]
values_
uint256[]
callDatas_
bytes[]
<none>
bytes32
Returns
proposalId_
uint256
proposalId The unique identifier for the proposal.
Allows the caller to create a proposal.
Parameters
targets_
address[]
values_
uint256[]
callDatas_
bytes[]
description_
string
Returns
proposalId_
uint256
proposalId The unique identifier for the proposal.
Set the cash token and proposal fee to be used to create proposals going forward.
Parameters
newCashToken_
address
newProposalFee_
uint256
Sends the proposal fee for proposal proposalId
to the vault, if it is Defeated or Expired.
Parameters
proposalId_
uint256
One of the valid proposals. Adds account
to list
at the Registrar.
Parameters
list_
bytes32
account_
address
One of the valid proposals. Removes account
to list
at the Registrar.
Parameters
list_
bytes32
account_
address
One of the valid proposals. Removes accountToRemove
and adds accountToAdd
to list
at the Registrar.
Parameters
list_
bytes32
accountToRemove_
address
accountToAdd_
address
One of the valid proposals. Sets key
to value
at the Registrar.
Parameters
key_
bytes32
value_
bytes32
One of the valid proposals. Sets the proposal fee of the Standard Governor.
Parameters
newProposalFee_
uint256
module:voting
A description of the possible "support" values for castVote and the way these votes are counted, meant to be consumed by UIs to show correct vote options and interpret the results. The string is a URL-encoded sequence of key-value pairs that each describe one aspect, for example support=for,against&quorum=for
. The string can be decoded by the standard URLSearchParams JavaScript class.
Returns all the proposal details for a proposal with identifier proposalId
.
Parameters
proposalId_
uint256
Returns
voteStart_
uint48
voteStart The first clock value when voting on the proposal is allowed.
voteEnd_
uint48
voteEnd The last clock value when voting on the proposal is allowed.
state_
ProposalState
state The state of the proposal.
noVotes_
uint256
noVotes The amount of votes cast against the proposal.
yesVotes_
uint256
yesVotes The amount of votes cast for the proposal.
proposer_
address
proposer The address of the account that created the proposal.
quorum_
uint256
quorum The number of votes required to meet quorum.
Returns the proposal fee information.
Parameters
proposalId_
uint256
Returns
cashToken_
address
cashToken The address of the cash token for this particular proposal fee.
fee_
uint256
amount The amount of cash token of the proposal fee.
Returns whether voter
has voted on all proposals in epoch
.
Parameters
voter_
address
epoch_
uint256
Returns
<none>
bool
Whether voter
has voted on all proposals in epoch
.
Returns the minimum number of eligible (COUNTING_MODE) votes for a proposal to succeed.
Returns the state of a proposal with identifier proposalId
.
Parameters
proposalId_
uint256
Returns
<none>
ProposalState
The state of the proposal.
Cast votes on several proposals for voter_
.
Parameters
voter_
address
The address of the voter.
proposalIds_
uint256[]
The unique identifiers of the proposals.
supportList_
uint8[]
The type of support to cast for each proposal.
reasonList_
string[]
The list of reason per proposal IDs to cast.
Returns
weight_
uint256
The number of votes the voter cast on each proposal.
Adds account
to list
at the Registrar.
Parameters
list_
bytes32
The key for some list.
account_
address
The address of some account to be added.
Cast weight_
votes on a proposal with id proposalId_
for voter_
.
Parameters
voter_
address
The address of the voter.
weight_
uint256
The number of votes the voter is casting.
proposalId_
uint256
The unique identifier of the proposal.
support_
uint8
The type of support to cast for the proposal.
reason_
string
The reason for which the caller casts their vote, if any.
Creates a new proposal with the given parameters.
Parameters
proposalId_
uint256
The unique identifier of the proposal.
voteStart_
uint16
The epoch at which the proposal will start collecting votes.
Removes account_
from list_
at the Registrar.
Parameters
list_
bytes32
The key for some list.
account_
address
The address of some account to be removed.
Set cash token to newCashToken_
.
Parameters
newCashToken_
address
The address of the new cash token.
Set proposal fee to newProposalFee_
.
Parameters
newProposalFee_
uint256
The new proposal fee.
Transfer amount_
of token_
to to_
.
Parameters
token_
address
The address of the token to transfer.
to_
address
The address of the recipient.
amount_
uint256
The amount of tokens to transfer.
Returns the number of clock values that must elapse before voting begins for a newly created proposal.
Returns
<none>
uint16
The voting delay.
All proposals target this contract itself, and must call one of the listed functions to be valid.
Parameters
callData_
bytes
The call data to check.
Returns the number of clock values between the vote start and vote end.
Returns
<none>
uint16
The voting period.
The proposal fee info.
Properties
cashToken
address
The address of the cash token used to pay the fee.
fee
uint256
The amount of the fee per proposal.