governance_vote.gno
Vote
func Vote(
cur realm,
proposalId int64,
yes bool
) stringVote allows a user to vote on a given proposal.
The proposal's timestamp-based smoothing calculation determines the applied weight. A vote cannot be changed after it is recorded.
Halt check: reverts while the Governance halt scope is active, except for halt-recovery proposals that only target the halt realm.
Parameters
Name
Type
Description
cur
realm
Current realm context; callers use cross(cur) when crossing into this realm.
proposalId
int64
The ID of the proposal to vote.
yes
bool
The flag to vote as yes or not.
Return Values
Name
Type
Description
voteWeight
string
The caller's calculated vote weight, formatted as a decimal string.
Last updated