IGovernor
Inherits: IERC6372, IERC712
Author: M^0 Labs
Functions
castVote
Allows the caller to cast a vote on a proposal with id proposalId
.
Parameters
Returns
castVoteBySig
Allows a signer to cast a vote on a proposal with id proposalId
via an ECDSA secp256k1 signature.
Parameters
Returns
castVoteBySig
Allows voter
to cast a vote on a proposal with id proposalId
via an arbitrary signature.
Parameters
Returns
castVoteWithReason
Allows the caller to cast a vote with reason on a proposal with id proposalId
.
Parameters
Returns
castVoteWithReasonBySig
Allows a signer to cast a vote with reason on a proposal with id proposalId
via an ECDSA secp256k1 signature.
Parameters
Returns
castVoteWithReasonBySig
Allows voter
to cast a vote with reason on a proposal with id proposalId
via an arbitrary signature.
Parameters
Returns
execute
Allows the caller to execute a proposal.
Parameters
Returns
propose
Allows the caller to create a proposal.
Parameters
Returns
COUNTING_MODE
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.
getVotes
Returns the voting power of account
at clock value timepoint
.
Parameters
Returns
hashProposal
Returns the unique identifier for the proposal if it were created at this exact moment.
Parameters
Returns
hasVoted
Returns whether account
has voted on the proposal with identifier proposalId
.
Parameters
Returns
name
Returns the name of the contract.
proposalDeadline
Returns the last clock value when voting on the proposal with identifier proposalId
is allowed.
Parameters
Returns
proposalProposer
Returns the account that created the proposal with identifier proposalId
.
Parameters
Returns
proposalSnapshot
Returns the clock value used to retrieve voting power to vote on proposal with identifier proposalId
.
Parameters
Returns
proposalThreshold
Returns the required voting power an account needs to create a proposal.
proposalVotes
Returns the vote support totals for the proposal with identifier proposalId
.
Parameters
Returns
quorum
Returns the minimum number of eligible (COUNTING_MODE) votes for a proposal to succeed.
state
Returns the state of a proposal with identifier proposalId
.
Parameters
Returns
token
Returns the EIP-5805 token contact used for determine voting power and total supplies.
votingDelay
Returns the number of clock values that must elapse before voting begins for a newly created proposal.
votingPeriod
Returns the number of clock values between the vote start and vote end.
BALLOT_TYPEHASH
Returns the EIP712 typehash used in the encoding of the digest for castVoteBySig
function.
BALLOT_WITH_REASON_TYPEHASH
Returns the EIP712 typehash used in the encoding of the digest for castVoteWithReasonBySig
function.
Events
ProposalCreated
Emitted when a proposal has been created.
Parameters
ProposalExecuted
Emitted when a proposal has been executed.
Parameters
VoteCast
Emitted when a vote for a proposal with id proposalId
has been cast by voter
.
Parameters
Enums
ProposalState
Proposal state.