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

padv5 state

Back to all declarations

launches

v0.Tree

// id -> \*Launch

Open
OID
08df2a…24c1:4
launches details

Inspect ref

bySymbol

v0.Tree

// symbol -> id string

Open
OID
08df2a…24c1:6
bySymbol details

Inspect ref

nextID

v0.ID

Value

<zero>

nextTokenID

v0.ID

// GRC20 identity sequence (shared for all launches)

Value

<zero>

protocolAddr

.uverse.address

Value

<gnolang.StringValue>

protocolFees

int64

Value

0

inited

bool

Value

true

testSkipBanker

bool

Value

false

Trade

type

Trade is one price sample for charts (capped history per launch).

Value

padv5.Trade

Launch

type

Launch is one meme market: curve phase then locked pool phase. token/ledger are unexported so external packages cannot Mint/Burn via field access.

Value

padv5.Launch

Init

func()

Init sets the protocol treasury. First EOA caller becomes fee recipient.

Open
OID
08df2a…24c1:13
Init details

Inspect func

mustLaunch

func(id string) *padv5.Launch
Open
OID
08df2a…24c1:16
mustLaunch details

Inspect func

balOf

func(l *padv5.Launch, addr .uverse.address) int64
Open
OID
08df2a…24c1:17
balOf details

Inspect func

addBal

func(l *padv5.Launch, addr .uverse.address, delta int64)

addBal mints (delta>0) or burns (delta\<0) GRC20 via pad-owned PrivateLedger.

Open
OID
08df2a…24c1:18
addBal details

Inspect func

requireMinOut

func(got int64, minOut int64, what string)
Open
OID
08df2a…24c1:19
requireMinOut details

Inspect func

snipeBoughtOf

func(l *padv5.Launch, buyer .uverse.address) int64
Open
OID
08df2a…24c1:20
snipeBoughtOf details

Inspect func

checkAndAddSnipe

func(l *padv5.Launch, buyer .uverse.address, tokensOut int64)
Open
OID
08df2a…24c1:21
checkAndAddSnipe details

Inspect func

sendUgnot

func(to .uverse.address, amount int64)
Open
OID
08df2a…24c1:22
sendUgnot details

Inspect func

requireUserPayment

func() int64
Open
OID
08df2a…24c1:23
requireUserPayment details

Inspect func

noteBuyer

func(l *padv5.Launch, buyer .uverse.address)
Open
OID
08df2a…24c1:24
noteBuyer details

Inspect func

spotPriceScaled

func(l *padv5.Launch) int64

spotPriceScaled returns ugnot/token \* 1e6 from current curve or pool reserves.

Open
OID
08df2a…24c1:26
spotPriceScaled details

Inspect func

recordTrade

func(l *padv5.Launch, side int, ugnot int64, tokens int64)
Open
OID
08df2a…24c1:27
recordTrade details

Inspect func

maybeRefundBond

func(l *padv5.Launch)
Open
OID
08df2a…24c1:28
maybeRefundBond details

Inspect func

Create

func(name string, symbol string, uri string) string

Create deploys a fair-launch meme. Requires CreateBondUgnot via -send. No pre-mint; all tradeable float starts on the bonding curve.

Open
OID
08df2a…24c1:29
Create details

Inspect func

AdenaPathOf

func(id string) string

AdenaPathOf returns the grc20reg / Adena token key: packagePath.SYMBOL (Token.ID is packagePath.SYMBOL.seq — Adena rejects that form).

Open
OID
08df2a…24c1:30
AdenaPathOf details

Inspect func

adenaKeyFromTokenID

func(tokenID string, symbol string) string

adenaKeyFromTokenID strips the trailing .seq from Token.ID when present.

Open
OID
08df2a…24c1:31
adenaKeyFromTokenID details

Inspect func

Buy

func(id string, minTokensOut int64) int64

Buy spends -send ugnot on the bonding curve; credits tokens to the caller. minTokensOut: slippage floor (0 = disabled). Auto-graduates at threshold. Oversized buys that would exceed remaining curve supply panic (no silent dust).

Open
OID
08df2a…24c1:32
Buy details

Inspect func

Sell

func(id string, tokensIn int64, minUgnotOut int64) int64

Sell burns curve tokens and pays ugnot (fee on output). minUgnotOut: slippage floor (0 = disabled).

Open
OID
08df2a…24c1:33
Sell details

Inspect func

Graduate

func(id string)

Graduate permissionlessly moves a ready curve into a permanently locked CPMM.

Open
OID
08df2a…24c1:34
Graduate details

Inspect func

TokenIDOf

func(id string) string

TokenIDOf returns the GRC20 Token.ID() for a launch.

Open
OID
08df2a…24c1:36
TokenIDOf details

Inspect func

GRC20Bank

func(id string) *grc20.Token

GRC20Bank returns the underlying \*grc20.Token for interop (metadata / external DEX). Does not expose PrivateLedger — mint/burn stay pad-only.

Open
OID
08df2a…24c1:37
GRC20Bank details

Inspect func

SwapBuy

func(id string, minTokensOut int64) int64

SwapBuy buys tokens from the graduated pool with -send ugnot. minTokensOut: slippage floor (0 = disabled).

Open
OID
08df2a…24c1:38
SwapBuy details

Inspect func

SwapSell

func(id string, tokensIn int64, minUgnotOut int64) int64

SwapSell sells tokens into the graduated pool for ugnot. minUgnotOut: slippage floor (0 = disabled).

Open
OID
08df2a…24c1:39
SwapSell details

Inspect func

Transfer

func(id string, to .uverse.address, amount int64)

Transfer moves GRC20 tokens between addresses (user-initiated).

Open
OID
08df2a…24c1:40
Transfer details

Inspect func

Approve

func(id string, spender .uverse.address, amount int64)

Approve sets GRC20 allowance so DEX/contracts can TransferFrom.

Open
OID
08df2a…24c1:41
Approve details

Inspect func

TransferFrom

func(id string, from .uverse.address, to .uverse.address, amount int64)

TransferFrom spends allowance: spender = MsgCall EOA caller. Enables DEX / routers that hold allowance from Approve.

Open
OID
08df2a…24c1:42
TransferFrom details

Inspect func

ClaimCreatorFees

func(id string) int64

ClaimCreatorFees withdraws accrued creator fees for a launch.

Open
OID
08df2a…24c1:43
ClaimCreatorFees details

Inspect func

ClaimProtocolFees

func() int64

ClaimProtocolFees withdraws protocol treasury fees.

Open
OID
08df2a…24c1:44
ClaimProtocolFees details

Inspect func

TransferProtocol

func(newAddr .uverse.address)

TransferProtocol rotates the protocol fee recipient (current protocol only).

Open
OID
08df2a…24c1:45
TransferProtocol details

Inspect func

ProtocolAddress

func() string

ProtocolAddress returns the current protocol treasury address.

Open
OID
08df2a…24c1:46
ProtocolAddress details

Inspect func

BalanceOf

func(id string, owner .uverse.address) int64
Open
OID
08df2a…24c1:47
BalanceOf details

Inspect func

GetRaised

func(id string) int64
Open
OID
08df2a…24c1:49
GetRaised details

Inspect func

GetPool

func(id string) (ugnot int64, token int64)
Open
OID
08df2a…24c1:50
GetPool details

Inspect func

GetCreatorFees

func(id string) int64
Open
OID
08df2a…24c1:51
GetCreatorFees details

Inspect func

ResolveSymbol

func(symbol string) string
Open
OID
08df2a…24c1:54
ResolveSymbol details

Inspect func

ListIDs

func() string

ListIDs returns newline-separated launch IDs (sorted by AVL key / creation order).

Open
OID
08df2a…24c1:55
ListIDs details

Inspect func

LaunchInfo

func(id string) string

LaunchInfo returns a single-line pipe-delimited summary for UIs/indexers: id|name|symbol|status|raised|sold|buyers|creatorFees|poolUgnot|poolToken|uri|creator|virtualUgnot|virtualToken|created|tokenID|gnoswapReady status: 0=curve 1=graduated; gnoswapReady: 0|1

Open
OID
08df2a…24c1:56
LaunchInfo details

Inspect func

ParamsInfo

func() string

ParamsInfo returns fixed MVP parameters for UI display. total|curve|poolSeed|gradThreshold|feeBps|createBond

Open
OID
08df2a…24c1:57
ParamsInfo details

Inspect func

TradeHistory

func(id string) string

TradeHistory returns newline-separated chart points: height|side|ugnot|tokens|priceScaled side: 0=buy 1=sell 2=open/graduate. Ordered oldest → newest.

Open
OID
08df2a…24c1:58
TradeHistory details

Inspect func

TradeCount

func(id string) int

TradeCount returns number of stored chart samples for a launch.

Open
OID
08df2a…24c1:59
TradeCount details

Inspect func

resetForTest

func()

resetForTest clears package state between unit tests.

Open
OID
08df2a…24c1:60
resetForTest details

Inspect func

TotalSupply

int64

Value

1000000000

CurveSupply

int64

// sold on bonding curve

Value

800000000

PoolSeed

int64

// locked into CPMM at graduation

Value

200000000

VirtualUgnot0

int64

// 30 GNOT virtual

Value

30000000

VirtualToken0

int64

// virtual token side

Value

1073000191

GraduationThreshold

int64

Value

100000000

FeeBPS

int64

Value

120

CreatorFeeShareBPS

int64

Value

4000

ProtocolFeeShareBPS

int64

Value

4000

CreateBondUgnot

int64

Value

2000000

BondRefundBuyers

int

Value

5

BondRefundMinRaised

int64

// ≥5 GNOT raised

Value

10000000

BondRefundMaxHeights

int64

Value

100000

AntiSnipeHeights

int64

Value

30

AntiSnipeMaxBuyBPS

int64

// 5% per address in window

Value

300

StatusCurve

untyped bigint

Value

(0 <untyped> bigint)

StatusGraduated

untyped bigint

Value

(1 <untyped> bigint)

MaxTradeHistory

untyped bigint

Value

(256 <untyped> bigint)

TradeSideBuy

untyped bigint

Value

(0 <untyped> bigint)

TradeSideSell

untyped bigint

Value

(1 <untyped> bigint)

TradeSideOpen

untyped bigint

// initial listing mark

Value

(2 <untyped> bigint)

DenomUgnot

untyped string

Value

"ugnot"

Render

func(path string) string

Render provides on-chain discovery (gnoweb). Read-only by convention. Paths: "" — home / list token/{id} — launch detail help — API help

Open
OID
08df2a…24c1:61
Render details

Inspect func

renderToken

func(id string) string
Open
OID
08df2a…24c1:65
renderToken details

Inspect func

progressBar

func(pct int64) string
Open
OID
08df2a…24c1:66
progressBar details

Inspect func
launches : v0.Tree Inspect
bySymbol : v0.Tree Inspect
nextID : v0.ID =<zero>
nextTokenID : v0.ID =<zero>
protocolAddr : .uverse.address =<gnolang.StringValue>
protocolFees : int64 =0
inited : bool =true
testSkipBanker : bool =false
Trade : type =padv5.Trade
Launch : type =padv5.Launch
Init : func() Inspect
requireInit : func() Inspect
mustLaunch : func(id string) *padv5.Launch Inspect
balOf : func(l *padv5.Launch, addr .uverse.address) int64 Inspect
addBal : func(l *padv5.Launch, addr .uverse.address, delta int64) Inspect
requireMinOut : func(got int64, minOut int64, what string) Inspect
snipeBoughtOf : func(l *padv5.Launch, buyer .uverse.address) int64 Inspect
checkAndAddSnipe : func(l *padv5.Launch, buyer .uverse.address, tokensOut int64) Inspect
sendUgnot : func(to .uverse.address, amount int64) Inspect
requireUserPayment : func() int64 Inspect
noteBuyer : func(l *padv5.Launch, buyer .uverse.address) Inspect
tradeKey : func(n int64) string Inspect
spotPriceScaled : func(l *padv5.Launch) int64 Inspect
recordTrade : func(l *padv5.Launch, side int, ugnot int64, tokens int64) Inspect
maybeRefundBond : func(l *padv5.Launch) Inspect
Create : func(name string, symbol string, uri string) string Inspect
AdenaPathOf : func(id string) string Inspect
adenaKeyFromTokenID : func(tokenID string, symbol string) string Inspect
Buy : func(id string, minTokensOut int64) int64 Inspect
Sell : func(id string, tokensIn int64, minUgnotOut int64) int64 Inspect
Graduate : func(id string) Inspect
graduate : func(l *padv5.Launch) Inspect
TokenIDOf : func(id string) string Inspect
GRC20Bank : func(id string) *grc20.Token Inspect
SwapBuy : func(id string, minTokensOut int64) int64 Inspect
SwapSell : func(id string, tokensIn int64, minUgnotOut int64) int64 Inspect
Transfer : func(id string, to .uverse.address, amount int64) Inspect
Approve : func(id string, spender .uverse.address, amount int64) Inspect
TransferFrom : func(id string, from .uverse.address, to .uverse.address, amount int64) Inspect
ClaimCreatorFees : func(id string) int64 Inspect
ClaimProtocolFees : func() int64 Inspect
TransferProtocol : func(newAddr .uverse.address) Inspect
ProtocolAddress : func() string Inspect
BalanceOf : func(id string, owner .uverse.address) int64 Inspect
GetStatus : func(id string) int Inspect
GetRaised : func(id string) int64 Inspect
GetPool : func(id string) (ugnot int64, token int64) Inspect
GetCreatorFees : func(id string) int64 Inspect
ProtocolFees : func() int64 Inspect
LaunchCount : func() int Inspect
ResolveSymbol : func(symbol string) string Inspect
ListIDs : func() string Inspect
LaunchInfo : func(id string) string Inspect
ParamsInfo : func() string Inspect
TradeHistory : func(id string) string Inspect
TradeCount : func(id string) int Inspect
resetForTest : func() Inspect
TotalSupply : int64 =1000000000
CurveSupply : int64 =800000000
PoolSeed : int64 =200000000
VirtualUgnot0 : int64 =30000000
VirtualToken0 : int64 =1073000191
GraduationThreshold : int64 =100000000
FeeBPS : int64 =120
CreatorFeeShareBPS : int64 =4000
ProtocolFeeShareBPS : int64 =4000
CreateBondUgnot : int64 =2000000
BondRefundBuyers : int =5
BondRefundMinRaised : int64 =10000000
BondRefundMaxHeights : int64 =100000
AntiSnipeHeights : int64 =30
AntiSnipeMaxBuyBPS : int64 =300
StatusCurve : untyped bigint =(0 <untyped> bigint)
StatusGraduated : untyped bigint =(1 <untyped> bigint)
MaxTradeHistory : untyped bigint =(256 <untyped> bigint)
TradeSideBuy : untyped bigint =(0 <untyped> bigint)
TradeSideSell : untyped bigint =(1 <untyped> bigint)
TradeSideOpen : untyped bigint =(2 <untyped> bigint)
DenomUgnot : untyped string ="ugnot"
Render : func(path string) string Inspect
sanitize : func(s string) string Inspect
renderHome : func() string Inspect
renderToken : func(id string) string Inspect
progressBar : func(pct int64) string Inspect
renderHelp : func() string Inspect