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.

zdex_list.gno

1.28 Kb · 37 lines
 1package pad
 2
 3// tryListOnZdex — stub until Zdex hub allows farm/realm CreatePool.
 4// Live Pearl/mainnet: CreatePool is EOA-only + requireListed.
 5// Pad path today:
 6//  1) ReleaseListSeed(id) — WUGNOT + minted PoolToken → creator
 7//  2) EOA: optional wugnot.Withdraw → Approve(zdex RealmAddr) → CreatePool
 8//  3) ConfirmZdexList(id, poolId) — mark ListVenue=zdex
 9//
10// Pearl hub: gno.land/r/g1n4pl5uc4yt5r96m9w6fmdznx3x0jyg8l6arhmt/zdex/v3
11// CreatePool(cur, tokenKey, symbol, amountU, amountT, feeBps) string
12func tryListOnZdex(cur realm, l *Launch, raisedUgnot, liqTokens int64) bool {
13	_ = cur
14	_ = raisedUgnot
15	_ = liqTokens
16	if testForceZdexList && l != nil {
17		l.GnoswapListed = true // compat "listed" flag used by UI
18		l.GnoswapPoolPath = "ugnot|" + l.Symbol
19		l.GnoswapPositionID = 0
20		l.LiqWugnotUsed = raisedUgnot
21		l.GnoswapNote = "listed (test force zdex)"
22		l.ListVenue = VenueZdex
23		return true
24	}
25	if l != nil {
26		if l.ListSeedReleased {
27			l.GnoswapNote =
28				"zdex: seed released — EOA CreatePool then ConfirmZdexList(id, ugnot|SYMBOL); PreferredVenue=" +
29					l.PreferredVenue
30		} else {
31			l.GnoswapNote =
32				"zdex: ReleaseListSeed → EOA CreatePool (WUGNOT Withdraw + Approve RealmAddr) → ConfirmZdexList; PreferredVenue=" +
33					l.PreferredVenue
34		}
35	}
36	return false
37}