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.

pado source realm

Package pado is a launchpad template with no trade tax.

Overview

Package pado is a launchpad template with no trade tax.

One deployment is one realm and one WUGNOT purse. A creator copies this package into their own namespace with MsgAddPackage (gno.land/r/<creator>/pado). That purse is not padv3 and not any other creator's pad. This package cannot spawn those realms itself.

Inside one realm, each token has its own raise target and its own quote reserve. Sell and SwapSell pay only from that token's reserve. The bank balance is still a single number; the books are what keep launches apart.

Create locks raiseUgnot. Buy and Sell take no fee. At the target, Graduate moves that token's quote into an internal pool in this same realm. There is no Gnoswap list and no zDex list, and the owner cannot withdraw the raise.

Payment: the user wugnot.Transfer's to this realm, then calls Buy or SwapBuy with the same amount. A partial fill leaves the rest as that caller's prepaid credit (ClaimWugnot). Pass the amount you transferred. Coins that sit here without a Buy can be locked by the next Buy caller, same as padv3.

Constants 1

const TotalSupply, CurveSupply, VirtualToken0, MinRaiseUgnot, MaxRaiseUgnot, AntiSnipeHeights, AntiSnipeMaxBuyBPS, MaxURILen, StatusCurve, StatusGraduated, DenomUgnot

 1const (
 2	TotalSupply   int64 = 1_000_000_000
 3	CurveSupply   int64 = 800_000_000
 4	VirtualToken0 int64 = 1_073_000_191
 5
 6	// Creator-chosen raise, in ugnot. 1 GNOT = 1_000_000 ugnot.
 7	MinRaiseUgnot int64 = 1_000_000             // 1 GNOT
 8	MaxRaiseUgnot int64 = 1_000_000_000_000_000 // 1_000_000 GNOT
 9
10	// Opening window only. This is a size cap, not a fee.
11	AntiSnipeHeights   int64 = 20
12	AntiSnipeMaxBuyBPS int64 = 500 // 5% of TotalSupply per address
13
14	MaxURILen = 256
15
16	StatusCurve     = 0
17	StatusGraduated = 1
18
19	DenomUgnot = "ugnot"
20)
source

Functions 24

func Approve

crossing Action
1func Approve(cur realm, id string, spender address, amount int64)
source

Approve lets spender TransferFrom the caller's tokens.

func Buy

crossing Action
1func Buy(cur realm, id string, amount, minTokensOut int64) int64
source

Buy spends up to amount WUGNOT on the curve and mints tokens to the caller. No fee. A fill that reaches the raise graduates inside this call.

func ClaimWugnot

crossing Action
1func ClaimWugnot(cur realm) int64
source

ClaimWugnot withdraws the caller's prepaid remainder. It does not withdraw a launch's raised quote or pool.

func Create

crossing Action
1func Create(cur realm, name, symbol, uri string, raiseUgnot int64) string
source

Create opens one token. raiseUgnot is the quote this curve locks before graduate, in ugnot. Only the realm owner may call. The value is fixed here.

func Graduate

crossing Action
1func Graduate(cur realm, id string)
source

Graduate moves a filled curve into this realm's internal pool. The quote stays on this token's books. Anyone may call it once ready.

func Init

crossing Action
1func Init(cur realm)
source

Init sets the owner when deploy did not capture one. One shot.

func Render

1func Render(path string) string
source

Render lists the launches in this realm. Quote figures are ugnot.

func Sell

crossing Action
1func Sell(cur realm, id string, tokensIn, minUgnotOut int64) int64
source

Sell burns curve tokens and returns the quote this launch holds. No fee. Payout is capped at this launch's raised quote, so a rounding step cannot spend another launch's WUGNOT or the virtual seed.

func SwapBuy

crossing Action
1func SwapBuy(cur realm, id string, amount, minTokensOut int64) int64
source

SwapBuy buys from the post-graduate pool. No fee.

func SwapSell

crossing Action
1func SwapSell(cur realm, id string, tokensIn, minUgnotOut int64) int64
source

SwapSell sells into the post-graduate pool. No fee. Pays only from this launch's pool quote.

func Transfer

crossing Action
1func Transfer(cur realm, id string, to address, amount int64)
source

Transfer moves this realm's token. The quote reserve does not move.

func TransferAdmin

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

TransferAdmin rotates the launchpad owner. The raise stays in the realm.

func TransferFrom

crossing Action
1func TransferFrom(cur realm, id string, from, to address, amount int64)
source

TransferFrom spends the caller's allowance.

Dependencies

Source Files 4