IBatchGovernor
Inherits: IGovernor
Author: M^0 Labs
Functions
castVotes
Allows the caller to cast votes on multiple proposals.
Parameters
proposalIds
uint256[]
The list of unique proposal IDs being voted on.
supportList
uint8[]
The list of support type per proposal IDs to cast.
Returns
weight
uint256
The number of votes cast for each proposal (the same for all of them).
castVotesBySig
Allows a signer to cast votes on multiple proposals via an ECDSA secp256k1 signature.
Parameters
proposalIds
uint256[]
The list of unique proposal IDs being voted on.
supportList
uint8[]
The list of support type per proposal IDs to cast.
v
uint8
An ECDSA secp256k1 signature parameter.
r
bytes32
An ECDSA secp256k1 signature parameter.
s
bytes32
An ECDSA secp256k1 signature parameter.
Returns
weight
uint256
The number of votes cast for each proposal (the same for all of them).
castVotesBySig
Allows a signer to cast votes on multiple proposals via an arbitrary signature.
Parameters
voter
address
The address of the account casting the votes.
proposalIds
uint256[]
The list of unique proposal IDs being voted on.
supportList
uint8[]
The list of support type per proposal IDs to cast.
signature
bytes
An arbitrary signature
Returns
weight
uint256
The number of votes cast for each proposal (the same for all of them).
castVotesWithReason
Allows the caller to cast votes with reason on multiple proposals.
Parameters
proposalIds
uint256[]
The list of unique proposal IDs being voted on.
supportList
uint8[]
The list of support type per proposal IDs to cast.
reasonList
string[]
The list of reason per proposal IDs to cast.
Returns
weight
uint256
The number of votes cast for each proposal (the same for all of them).
castVotesWithReasonBySig
Allows a signer to cast votes with reason on multiple proposals via an ECDSA secp256k1 signature.
Parameters
proposalIds
uint256[]
The list of unique proposal IDs being voted on.
supportList
uint8[]
The list of support type per proposal IDs to cast.
reasonList
string[]
The list of reason per proposal IDs to cast.
v
uint8
An ECDSA secp256k1 signature parameter.
r
bytes32
An ECDSA secp256k1 signature parameter.
s
bytes32
An ECDSA secp256k1 signature parameter.
Returns
weight
uint256
The number of votes cast for each proposal (the same for all of them).
castVotesWithReasonBySig
Allows a signer to cast votes with reason on multiple proposals via an arbitrary signature.
Parameters
voter
address
The address of the account casting the votes.
proposalIds
uint256[]
The list of unique proposal IDs being voted on.
supportList
uint8[]
The list of support type per proposal IDs to cast.
reasonList
string[]
The list of reason per proposal IDs to cast.
signature
bytes
An arbitrary signature
Returns
weight
uint256
The number of votes cast for each proposal (the same for all of them).
getBallotDigest
Returns the ballot digest to be signed, via EIP-712, given an internal digest (i.e. hash struct).
Parameters
proposalId
uint256
The unique proposal ID being voted on.
support
uint8
The type of support to cast for the proposal.
Returns
<none>
bytes32
The digest to be signed.
getBallotsDigest
Returns the ballots digest to be signed, via EIP-712, given an internal digest (i.e. hash struct).
Parameters
proposalIds
uint256[]
The list of unique proposal IDs being voted on.
supportList
uint8[]
The list of support type per proposal IDs to cast.
Returns
<none>
bytes32
The digest to be signed.
getBallotWithReasonDigest
Returns the ballot with reason digest to be signed, via EIP-712, given an internal digest (i.e. hash struct).
Parameters
proposalId
uint256
The unique proposal ID being voted on.
support
uint8
The type of support to cast for the proposal.
reason
string
The reason for which the caller casts their vote, if any.
Returns
<none>
bytes32
The digest to be signed.
getBallotsWithReasonDigest
Returns the ballots with reason digest to be signed, via EIP-712, given an internal digest (i.e. hash struct).
Parameters
proposalIds
uint256[]
The list of unique proposal IDs being voted on.
supportList
uint8[]
The list of support type per proposal IDs to cast.
reasonList
string[]
The list of reason per proposal IDs to cast.
Returns
<none>
bytes32
The digest to be signed.
hashProposal
Returns the unique identifier for the proposal if it were created at this exact moment.
Parameters
callData
bytes
The single call data used to call this governor upon execution of a proposal.
Returns
<none>
uint256
The unique identifier for the proposal.
voteToken
Returns the EIP-5805 token contact used for determine voting power and total supplies.
BALLOTS_TYPEHASH
Returns the EIP712 typehash used in the encoding of the digest for castVotesBySig
function.
BALLOTS_WITH_REASON_TYPEHASH
Returns the EIP712 typehash used in the encoding of the digest for castVotesWithReasonBySig
function.
Errors
AlreadyVoted
Revert message when a voter is trying to vote on a proposal they already voted on.
ArrayLengthMismatch
Revert message when input arrays do not match in length.
EmptyProposalIdsArray
Revert message when the proposal IDs array is empty.
ExecutionFailed
Revert message when execution of a proposal fails.
Parameters
data
bytes
The revert data returned due to the failed execution.
InvalidCallData
Revert message when a proposal's call data is not specifically supported.
InvalidCallDatasLength
Revert message when a proposal's call data array is not of length 1.
InvalidTarget
Revert message when a proposal target is not this governor itself.
InvalidTargetsLength
Revert message when a proposal's targets array is not of length 1.
InvalidValue
Revert message when a proposal value is not 0 ETH.
InvalidValuesLength
Revert message when a proposal's values array is not of length 1.
InvalidVoteStart
Revert message when a an invalid vote start is detected.
InvalidVoteTokenAddress
Revert message when the vote token specified in the constructor is address(0).
NotSelf
Revert message when the caller of a governance-controlled function is not this governor itself.
ProposalCannotBeExecuted
Revert message when the proposal information provided cannot be executed.
ProposalDoesNotExist
Revert message when the proposal does not exist.
ProposalExists
Revert message when the proposal already exists.
ProposalInactive
Revert message when voting on a proposal that is not in an active state (i.e. not collecting votes).
Parameters
state
ProposalState
The current state of the proposal.
ZeroVotingPower
Revert message when voting on a proposal with a zero voting weight.
Enums
VoteType
The type of support to cast for a proposal.