Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

governance package

Overview

Package governance implements proposal lifecycle management and voting. It supports text proposals, parameter changes, and community-pool spending. Voting uses timestamped delegation history and quorum from total xGNS supply (including launchpad-held xGNS); proposal timing and thresholds are configurable.

Function

NewVotedVotingInfo

func NewVotedVotingInfo(availableVoteWeight int64, votedYes bool, votedWeight, votedHeight, votedAt int64) VotingInfo

NewVotedVotingInfo creates a voting information value with a recorded vote.

Parameters:

  • availableVoteWeight: total voting weight available to the user for this proposal
  • votedYes: true when the recorded vote is yes, false when it is no
  • votedWeight: voting weight applied to the recorded vote
  • votedHeight: block height at which the vote was recorded
  • votedAt: Unix timestamp at which the vote was recorded

Returns:

  • VotingInfo: voting record populated with the supplied weight, choice, height, and timestamp and marked as voted

Params

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/gov/governance.NewVotedVotingInfo(,,,,)"

Result