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. Proposals go through creation, voting, and execution phases with configurable parameters for voting delays, periods, and thresholds.

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 provided parameters. NewProposal is the main constructor for creating governance proposals.

  • metadata: proposal title and description
  • data: type-specific proposal data
  • proposerAddress: address of the proposal creator
  • configVersion: governance configuration version
  • snapshotTime: timestamp for voting weight snapshot lookup
  • createdHeight: creation block height

Returns:

  • *Proposal: newly created proposal instance

Params

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/gnoswap/gov/governance.NewProposal(,,,,,,,)"

Result