Vote
Last updated
Last updated
Cast a vote on a proposal. The account’s voting weight is determined by the number of votes the account had delegated to it at the time the proposal state became active.
proposalId
: ID of a proposal in which to cast a vote.
support
: An integer of 0 for against, 1 for in-favor, and 2 for abstain.
RETURN
: The voting weight of voter
.
Emits a event.
Cast a vote on a proposal with a reason attached to the vote.
proposalId
: ID of a proposal in which to cast a vote.
support
: An integer of 0 for against, 1 for in-favor, and 2 for abstain.
reason
: A string containing the voter’s reason for their vote selection.
RETURN
: The voting weight of voter
.
Emits a event.
Cast a vote with a reason and additional encoded parameters
proposalId
: ID of a proposal in which to cast a vote.
support
: An integer of 0 for against, 1 for in-favor, and 2 for abstain.
reason
: A string containing the voter’s reason for their vote selection.
params
: Additional encoded parameters.
RETURN
: The voting weight of voter
.
proposalId
: ID of a proposal in which to cast a vote.
support
: An integer of 0 for against, 1 for in-favor, and 2 for abstain.
v
: The recovery byte of the signature.
r
: Half of the ECDSA signature pair.
s
: Half of the ECDSA signature pair.
RETURN
: The voting weight of voter
.
Cast a vote with a reason and additional encoded parameters using the user’s cryptographic signature.
proposalId
: ID of a proposal in which to cast a vote.
support
: An integer of 0 for against, 1 for in-favor, and 2 for abstain.
reason
: A string containing the voter’s reason for their vote selection.
params
: Additional encoded parameters.
v
: The recovery byte of the signature.
r
: Half of the ECDSA signature pair.
s
: Half of the ECDSA signature pair.
RETURN
: The voting weight of voter
.
Minimum number of cast voted required for a proposal to be successful.
We will use a module that offers 3 options to voters: For, Against, and Abstain, and where only For and Abstain votes are counted towards quorum.
timepoint
: The timepoint
parameter corresponds to the snapshot used for counting vote. This allows to scale the quorum depending on values such as the totalSupply of a token at this timepoint (see {ERC20Votes}).
RETURN
: The number of cast voted required for a proposal to be successful.
Delay, between the proposal is created and the vote starts. The unit this duration is expressed in depends on the clock (see EIP-6372) this contract uses.
This can be increased to leave time for users to buy voting power, or delegate it, before the voting of a proposal starts.
RETURN
:The blocks between the proposal is created and the vote starts.
Delay between the vote start and vote end. The unit this duration is expressed in depends on the clock (see EIP-6372) this contract uses.
RETURN
: The blocks between the vote start and vote end.
Voting power of an account
at a specific timepoint
.
timepoint
: The timepoint
parameter corresponds to the snapshot used for counting vote.
account: The address of the voter
.
RETURN
: The voting power of an account.
Voting power of an account
at a specific timepoint
given additional encoded parameters.
timepoint
: The timepoint
parameter corresponds to the snapshot used for counting vote.
account: The address of the voter
.
params: The description of the vote
.
RETURN
: The voting power of an account.
proposalId
: ID of a proposal in which to cast a vote.
account: The address of the voter
.
RETURN
: Whether account
has cast a vote on proposalId
.
Returns a proposal ballot receipt of a given voter.
proposalId
: ID of a proposal in which to cast a vote.
account: The address of the voter
.
RETURN
: Return hasVoted, support and votes of a voter.
Emits a or event depending on the length of params.
This method has the same purpose as Cast Vote but it instead enables offline signatures to participate in Lybra governance voting. For more details on how to create an offline signature, review .
Emits a event.
Emits a or event depending on the length of params.