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

NewConfigPtr

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

NewConfigPtr constructs a Config and returns a pointer to it. The Config is allocated within the governance domain realm, satisfying realm allocation checks for callers (such as tests) that require a *Config value.

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: pointer to a 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.NewConfigPtr(,,,,,,)"

Result