gov_parameters.gno

Configures parameters related to the governance.

Init

func Init() {
	parameters = make(map[string]interface{})

	// 1/3 quorum initially
	setVoteQuorum(VoteQuorum{1000, 3000})
	// 3 day initially
	setVotePeriod(259200)
	// 1 day initially
	setDepositPeriod(86400)
	// 10_000_000 GNS initially
	setDepositMinimum(uint64(10_000_000))
}

Initializes the default governance parameters: the 33% quorum, the 3-day voting period, the 1-day deposit period, and the 10,000,000 GNS minimum deposit.

SubmitProposalGovParameterDepositMinimum

func SubmitProposalGovParameterDepositMinimum(
	title string,
	summary string,
	metadata string,
	initialDeposit uint64,

	newDepositMinimum uint64,
) uint64

Submits a proposal to modify the minimum deposit.

Parameters

NameTypeDescription

title

string

The title of the proposal.

summary

string

The executive summary of the proposal.

metadata

string

The detailed content of the proposal.

initialDeposit

uint64

The amount of tokens to initially deposit.

newDepositMinimum

uint64

A new minimum deposit.

Return Values

NameTypeDescription

proposalID

uint64

The ID of the proposal.

SubmitProposalGovParameterDepositPeriod

func SubmitProposalGovParameterDepositPeriod(
	title string,
	summary string,
	metadata string,
	initialDeposit uint64,

	newDepositPeriod uint64,
) uint64

Submits a proposal to modify the deposit period.

Parameters

NameTypeDescription

title

string

The title of the proposal.

summary

string

An executive summary of the proposal.

metadata

string

The detailed content of the proposal.

initialDeposit

uint64

The amount of tokens to initially deposit.

newDepositPeriod

uint64

A new deposit period.

Return Values

NameTypeDescription

proposalID

uint64

The ID of the proposal.

SubmitProposalGovParameterVotingPeriod

func SubmitProposalGovParameterVotingPeriod(
	title string,
	summary string,
	metadata string,
	initialDeposit uint64,

	newVotingPeriod uint64,
) uint64

Submits a proposal to modify the voting period.

Parameters

NameTypeDescription

title

string

The title of the proposal.

summary

string

An executive summary of the proposal.

metadata

string

The detailed content of the proposal.

initialDeposit

uint64

The amount of tokens to initially deposit.

newVotingPeriod

uint64

A new voting period.

Return Values

NameTypeDescription

proposalID

uint64

The ID of the proposal.

SubmitProposalGovParameterVoteQuorum

func SubmitProposalGovParameterVoteQuorum(
	title string,
	summary string,
	metadata string,
	initialDeposit uint64,

	newVoteQuorumNumerator uint64,
	newVoteQuorumDenominator uint64,
) uint64

Submits a proposal to modify the quorum.

Parameters

NameTypeDescription

title

string

The title of the proposal.

summary

string

An executive summary of the proposal.

metadata

string

The detailed content of the proposal.

initialDeposit

uint64

The amount of tokens to initially deposit.

newVoteQuorumNumerator

uint64

The numerator of a new quorum.

newVoteQuorumDenominator

uint64

The denominator of a new quorum.

Return Values

NameTypeDescription

proposalID

uint64

The ID of the proposal.

Last updated