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.

drop source realm

Package drop is the wizards token, symbol WIZ, version 4: the meme token and its genesis claim.

Overview

Package drop is the wizards token, symbol WIZ, version 4: the meme token and its genesis claim.

Supply is 10_000_000_000 WIZ. Decimals are 6, so one WIZ is tokenUnit base units and the mint is 10_000_000_000_000_000.

  • 75% airdrop, pro-rata to each wallet's genesis GNOT, paid from here
  • 15% liquidity, minted once to the pinned wallet g17xukdzx4w0q4tmendmsjy2luxk7lvfzv39nfkl
  • 7% liquidity incentives, minted once to the bound GovDAO realm
  • 3% community development, plus the pro-rata remainder, minted once to that same GovDAO realm

A leaf is "g1...:<amount>". Claim pays that full amount once. The deployer sets the claim start. The window is 90 days. Unclaimed airdrop is burned. Claim attaches no GNOT. Any attached coins revert. This realm has no withdraw. It cannot move the liquidity sleeve or the GovDAO balance after Seal. GovDAO spends the incentive sleeve and the community sleeve separately. GovDAO lives in gno.land/r/nym-wizards001/gov. Holders vote there. The realm does not recompute GNOT weights. SetTradeOpen stores the instant other wallets may transfer. Until that instant, only the liquidity wallet, the airdrop escrow, and GovDAO may move WIZ through Transfer or TransferFrom. Claim and Seal move the ledger directly and stay available. After SetPool, tokens that leave that pool share one buy cap for a short window. The liquidity wallet is never capped, so it can add liquidity during the window.

Constants 1

const tokenDecimals, tokenUnit, wholeSupply, mintSupply, CommunityBps, IncentiveBps, LiquidityBps, BpsBasis, ClaimWindow, VoteWindow, quorumBps, BuyCapWindow, BuyCapBucket, BuyCapPerBucket, tokenVersion, maxProofAunts, hashLen

 1const (
 2	// tokenDecimals is the GRC20 display scale. One WIZ is tokenUnit base units.
 3	tokenDecimals = 6
 4	// tokenUnit is 10^tokenDecimals.
 5	tokenUnit int64 = 1_000_000
 6	// wholeSupply is the mint in whole WIZ. mintSupply is the same mint in base units.
 7	// TotalSupply() is the circulating supply and shrinks when leftover airdrop is burned.
 8	wholeSupply int64 = 10_000_000_000
 9	mintSupply  int64 = wholeSupply * tokenUnit
10	// CommunityBps is 3% of supply. The pro-rata remainder is added on top.
11	CommunityBps int64 = 300
12	// IncentiveBps is the liquidity-incentive sleeve, 7% of supply.
13	IncentiveBps int64 = 700
14	// LiquidityBps is the liquidity sleeve, 15% of supply.
15	LiquidityBps int64 = 1_500
16	// BpsBasis is 100%.
17	BpsBasis int64 = 10_000
18
19	// ClaimWindow is the claim period after the deployer-set start: 90 days.
20	ClaimWindow int64 = 90 * 24 * 60 * 60
21	// VoteWindow is the longest a GovDAO ballot may lock a balance.
22	// gno.land/r/nym-wizards001/gov uses the same duration.
23	VoteWindow int64 = 7 * 24 * 60 * 60
24	// quorumBps is the yes-vote floor, measured against the sealed airdrop budget.
25	quorumBps int64 = 1_000
26
27	// BuyCapWindow is how long buys that leave the pool stay capped.
28	BuyCapWindow int64 = 10 * 60
29	// BuyCapBucket is one slice of that window. The cap resets each slice.
30	BuyCapBucket int64 = 60
31	// BuyCapPerBucket is 1% of the liquidity sleeve. Divide before multiply so the product fits in int64.
32	BuyCapPerBucket int64 = mintSupply / BpsBasis * LiquidityBps / 100
33
34	tokenVersion = "4"
35
36	maxProofAunts = 100
37	hashLen       = 32
38)
source

Functions 46

func BurnUnclaimed

crossing Action
1func BurnUnclaimed(cur realm)
source

BurnUnclaimed destroys the airdrop budget still here after the window. Anyone may call it. A second call reverts. GovDAO cannot recover it. The sleeves already sent are not burned.

func Claim

crossing Action
1func Claim(cur realm, index int, amount int64, auntsHex string)
source

Claim pays the caller's full sealed amount. Attaching coins reverts. There is no withdraw.

func ClaimTo

crossing Action
1func ClaimTo(cur realm, index int, amount int64, auntsHex string, to address)
source

ClaimTo pays the caller's full sealed amount to another address. The caller must still be the leaf. An invalid to pays the caller. to cannot be this realm. Attaching coins reverts. There is no withdraw.

func ClaimedSupply

Action
1func ClaimedSupply() int64
source

ClaimedSupply is the sum of leaves already paid. Burns and transfers do not change it.

func Init

crossing Action
1func Init(cur realm)
source

Init binds the addpkg signer as admin. Any other caller panics.

func NoteVote

crossing Action
1func NoteVote(cur realm, until int64)
source

NoteVote locks the signing caller's current balance until until. Only the bound GovDAO may call it. until cannot pass VoteWindow.

func Render

1func Render(path string) string
source

Render shows the version-4 split and the claim window.

func Seal

crossing Action
1func Seal(cur realm, rootHex string, eligibleCount int, airdropTotal int64, liquidityToArg address)
source

Seal mints the whole supply, commits the eligible-set Merkle root, and sends the sleeves out. airdropTotal is the sum of the leaf amounts, at most the 75% pool. Integer dust is added to the community mint. liquidityTo must be liquidityRecipient. Any other address panics. Incentive and community both go to the realm bound with SetGov.

func SetClaimStart

crossing Action
1func SetClaimStart(cur realm, start int64)
source

SetClaimStart opens claims at start (unix seconds). The deployer may call it once. start must be in the future. Claims run for ClaimWindow.

func SetGov

crossing Action
1func SetGov(cur realm)
source

SetGov binds the GovDAO. The caller must be that realm, and the transaction signer must be this token's admin. One call, before Seal. Seal sends both the incentive sleeve and the community sleeve there.

func SetPool

crossing Action
1func SetPool(cur realm, market address)
source

SetPool registers the pool once. The buy cap starts at this call. The liquidity wallet cannot be the pool. That wallet sends tokens into the pool, and those sends are not buys.

func SetTradeOpen

crossing Action
1func SetTradeOpen(cur realm, start int64)
source

SetTradeOpen stores the instant public transfers open. One call. The instant has to be in the future. Until it arrives, Transfer and TransferFrom move tokens only for the liquidity wallet, the airdrop escrow, and the bound GovDAO.

func TransferAdmin

crossing Action
1func TransferAdmin(cur realm, next address)
source

TransferAdmin moves the admin seat. Admin cannot move funds.

func Version

Action
1func Version() string
source

Version is the token book. Version 4 sends liquidity to the named address and sends incentive plus community to the bound GovDAO.

Dependencies

Source Files 2