propose(targets[],values[],callDatas[],description):proposalId
Creates a new unique proposal
Marks next voting epoch as active if it is the first submitted proposal for the next voting epoch
Returns proposalIdof the newly created proposal.
castVote(proposalId,support):weight
Reverts if proposal is not Active
Reverts if voting weight of msg.sender is 0
Reverts if msg.sender already voted
Gets votes from the previous epoch as weight of msg.sender
Accounts for msg.sender support vote
Increases numberOfProposalsVotedOnAt for msg.sender
If numberOfProposalsVotedOnAt==numberOfEpochProposals:
Marks msg.sender participation for POWER inflation of token holders
Increase msg.sender voting power by epoch inflator amount
Mints ZERO rewards to msg.sender
Returns weight of msg.sender.
castVotes(proposalIds[],supports):weight
Votes in batch for all proposalIds[].
See castVote(proposalId,support)
execute(targets[],values[],callDatas[],description):proposalId
Reverts if the current epoch is 0
Reverts if there is no proposal in Succeeded state for calculated proposalId
Executes governance action
Sends proposalFee back to proposalId proposer.
sendProposalFeeToVault(proposalId)
Reverts if proposalId is not Defeated or Expired
Reverts if the proposalFee for this proposalId is 0
Sends paid proposalFee to the Distribution vault.
setCashToken(newCashToken,newProposalFee)
Reverts if not called by ZeroGovernor
Sets newCashToken in StandardGovernor
Sets newCashToken in POWER token
Sets newProposalFee.
getProposal(proposalId)
Returns
quorum, number of votes required to meet quorum.
state(proposalId)
See lifecycle diagram for more information on state’s transition for StandardGovernor.
Last updated