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

NewProposal

func NewProposal( proposalID int64, status *ProposalStatus, metadata *ProposalMetadata, data *ProposalData, proposerAddress address, configVersion int64, snapshotTime int64, createdHeight int64, ) *Proposal

NewProposal creates a new proposal instance with the supplied identity, lifecycle, metadata, and type-specific data.

Parameters:

  • proposalID: unique identifier assigned to the proposal
  • status: initial schedule, action, and voting status
  • metadata: proposal title and description metadata
  • data: type-specific proposal data
  • proposerAddress: address of the proposal creator
  • configVersion: governance configuration version captured for the proposal
  • snapshotTime: timestamp anchor for historical voting-weight lookup
  • createdHeight: block height at which the proposal was created

Returns:

  • *Proposal: newly initialized proposal containing the supplied fields

Params

Command

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

Result