For the complete documentation index, see llms.txt. This page is also available as Markdown.

proposal_vote_status.gno

Types

ProposalVoteStatus

ProposalVoteStatus tracks the voting tallies and requirements for a proposal. This structure manages vote counting, quorum calculation, and voting outcome determination.

source

Methods

Clone

Clone returns an independent copy of the vote status, or nil when the receiver is nil.

Return Values

Name
Type
Description

*ProposalVoteStatus

*ProposalVoteStatus

copied vote tallies and requirements, or nil for a nil receiver.

source

MaxVotingWeight

Getter methods MaxVotingWeight returns the maximum voting weight captured for the proposal.

Return Values

Name
Type
Description

int64

int64

maximum voting weight used when evaluating the proposal's quorum.

source

NoWeight

NoWeight returns the total weight of "no" votes.

Return Values

Name
Type
Description

int64

int64

total "no" vote weight

source

QuorumAmount

QuorumAmount returns the voting weight required for the proposal to satisfy quorum.

Return Values

Name
Type
Description

int64

int64

minimum total vote weight required by this proposal.

source

SetMaxVotingWeight

SetMaxVotingWeight records the proposal's maximum voting-weight snapshot.

Parameters

Name
Type
Description

maxVotingWeight

int64

maximum voting weight available when the proposal was created.

source

SetNoWeight

SetNoWeight replaces the proposal's accumulated no-vote weight.

Parameters

Name
Type
Description

no

int64

total weight to record for negative votes.

source

SetQuorumAmount

SetQuorumAmount records the proposal's quorum requirement.

Parameters

Name
Type
Description

quorumAmount

int64

minimum total vote weight required for this proposal.

source

SetYesWeight

Setter methods SetYesWeight replaces the proposal's accumulated yes-vote weight.

Parameters

Name
Type
Description

yes

int64

total weight to record for affirmative votes.

source

YesWeight

YesWeight returns the total weight of "yes" votes.

Return Values

Name
Type
Description

int64

int64

total "yes" vote weight

source

Constructors

  • func NewProposalVoteStatus(maxVotingWeight int64, quorumAmount int64) *ProposalVoteStatus (source)

Last updated