Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

gov source realm

Package gov is the WIZ GovDAO treasury, token version 4.

Overview

Package gov is the WIZ GovDAO treasury, token version 4.

Seal on gno.land/r/nym-wizards001/drop sends two sleeves here: the incentive sleeve (7% of supply) and community development (3% plus the pro-rata remainder). A vote spends one sleeve. It cannot spend the other. Liquidity was sent to the address named in Seal, and this realm cannot move it.

Voting weight is the signer's WIZ balance. One vote per address. The window is 7 days, the same duration as drop.VoteWindow. A spend passes when yes beats no and yes reaches drop.Quorum, 10% of the sealed airdrop. There is no withdraw and no listing vote.

Constants 1

const KindSpend, KindSignal, KindIncentive, VoteWindow, maxMemo, notePrefix, noteSplit

 1const (
 2	// KindSpend pays community WIZ to the named address.
 3	// The memo is optional and is not spent.
 4	KindSpend = 1
 5	// KindSignal stores a memo and moves nothing. Kind 2 is unused.
 6	KindSignal = 3
 7	// KindIncentive pays incentive WIZ to the named address.
 8	// The memo is optional and is not spent.
 9	KindIncentive = 4
10
11	// VoteWindow matches drop.VoteWindow. A ballot locks the voter's balance for this long.
12	VoteWindow int64 = 7 * 24 * 60 * 60
13	// maxMemo is the packed note: a title, a summary, and a change.
14	maxMemo = 1200
15
16	notePrefix = "wizards-note/1\n"
17	noteSplit  = "\n---\n"
18)
source

Functions 18

func Bind

crossing Action
1func Bind(cur realm)
source

Bind records this realm as the drop token's GovDAO. The transaction signer must be the token admin. One call, before Seal.

func Execute

crossing Action
1func Execute(cur realm, id int)
source

Execute closes a finished proposal. A passed spend pays one sleeve. A failed vote moves nothing. Anyone may call it.

func Propose

crossing Action
1func Propose(cur realm, kind int, to address, tokenAmt int64, memo string) int
source

Propose opens a vote. Claims on the token must already have started. The caller must hold WIZ. kind is KindSpend, KindSignal, or KindIncentive.

func Render

1func Render(path string) string
source

Render prints one proposal at "proposal/<id>". Other paths print the treasury.

func Vote

crossing Action
1func Vote(cur realm, id int, yes bool)
source

Vote records the caller's current WIZ balance as yes or no. One vote per address. That balance stays locked until this proposal ends.

func Voted

Action
1func Voted(id int, voter address) (cast bool, yes bool)
source

Voted reports whether voter has a ballot on id. A missing ballot is (false, false).

Dependencies

Source Files 2