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

NewConfig

func NewConfig( votingStartDelay, votingPeriod, votingWeightSmoothingDuration, quorum, proposalCreationThreshold, executionDelay, executionWindow int64, ) Config

NewConfig constructs a governance configuration from the supplied delays, thresholds, quorum percentage, and execution window.

Parameters:

  • votingStartDelay: delay from proposal creation until voting opens, in seconds
  • votingPeriod: duration for which voting remains open, in seconds
  • votingWeightSmoothingDuration: interval used to smooth delegation weight, in seconds
  • quorum: required approval percentage of total xGNS supply, from 0 through 100
  • proposalCreationThreshold: minimum xGNS amount required to create a proposal
  • executionDelay: delay after voting ends before execution, in seconds
  • executionWindow: duration after the execution delay during which execution is allowed, in seconds

Returns:

  • Config: configuration value populated with the supplied governance parameters

Params

Command

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

Result