KindFixed
untyped string// one price, open to every wallet
Value
"fixed"
KindAllowlist
untyped string// only addresses under a Merkle root, each with its own allowance
Value
"allowlist"
KindHolder
untyped string// one mint per token held in another collection
Value
"holder"
KindDutch
untyped string// the price falls in a straight line until the stage ends
Value
"dutch"
maxPrimaryFeeBPS
untyped bigint// 5% of a mint price
Value
(500 <untyped> bigint)
maxStages
untyped bigintValue
(10 <untyped> bigint)
maxStageSeconds
untyped bigintValue
(31536000 <untyped> bigint)
maxPerWallet
untyped bigintValue
(1000000 <untyped> bigint)
stage
typestage is one mint window of a collection, open during \[Start, End).
Value
v1.stage
stages
v0.Tree// collection ID -> \[]stage, at most maxStages
- OID
- 04d01e…0246:4
stages details
minted
v0.Tree// "\<collection>/\<stage>/\<address>" -> int64
- OID
- 04d01e…0246:6
minted details
gated
v0.Tree// "\<collection>/\<stage>/\<gate token number>" -> true
- OID
- 04d01e…0246:8
gated details
directCaller
func() .uverse.address- OID
- 04d01e…0246:9
directCaller details
CreateCollection
func(name string, symbol string, description string, image string, banner string, website string, mode string, revocable bool, maxSupply int64, metadataMode string, baseURI string, placeholderURI string, commitment string, provenance string, royalties string, currencyKey string, maxFee int64) stringCreateCollection registers the caller's collection in the NFT ledger and pays the collection fee to the treasury. maxFee is the highest fee the caller accepts: a fee above it aborts before anything is taken, whatever the caller's allowance. Native coins are attached for exactly the fee; a token is pulled for exactly the fee. The collection terms are documented on nft.Create.
- OID
- 04d01e…0246:11
CreateCollection details
stagesOf
func(id string) []v1.stage- OID
- 04d01e…0246:12
stagesOf details
requireCreator
func(id string)requireCreator aborts unless the caller is the collection's creator. The creator may be a realm, a DAO for instance: what it signs here moves no funds. Coins attached to a user's call would stay in this realm, so they are refused; coins a realm's transaction carries belong to that realm.
- OID
- 04d01e…0246:13
requireCreator details
emitStage
func(id string, index int, s v1.stage)emitStage publishes every term of a stage, so a reader of events alone knows what each stage sells.
- OID
- 04d01e…0246:14
emitStage details
validRoot
func(s string) bool- OID
- 04d01e…0246:15
validRoot details
newStage
func(id string, kind string, start int64, end int64, price int64, floor int64, supplyCap int64, perWallet int64, root string, gate string, currencyKey string) v1.stagenewStage validates a stage of collection id that has not started. Fields a kind does not use must be zero, so a stage reads the same to everyone. A holder stage is gated on another collection, and only on the tokens that collection had minted when the stage was placed: gated on its own, or on a collection gated on it in turn, every token minted would open one more mint.
- OID
- 04d01e…0246:16
newStage details
place
func(id string, index int, s v1.stage, maxFeeBPS int64)place writes s at index (len(list) appends) after checking that the caller is the collection's creator, the mint lane accepts the currency, the protocol fee is within what the creator accepts and no other stage overlaps. The fee is pinned on the stage: a later change does not reach it.
- OID
- 04d01e…0246:17
place details
AddStage
func(id string, kind string, start int64, end int64, price int64, floor int64, supplyCap int64, perWallet int64, root string, gate string, currencyKey string, maxFeeBPS int64) intAddStage schedules a mint window and returns its index. The arguments are the terms of the stage, then the highest protocol fee the creator accepts. A collection has ten stages for its whole life: a stage that ended keeps its slot.
- OID
- 04d01e…0246:18
AddStage details
EditStage
func(id string, index int, kind string, start int64, end int64, price int64, floor int64, supplyCap int64, perWallet int64, root string, gate string, currencyKey string, maxFeeBPS int64)EditStage replaces a stage that has not started. Once a stage has opened its terms are final, whatever the replacement would have been: it can only be ended.
- OID
- 04d01e…0246:19
EditStage details
EndStage
func(id string, index int)EndStage closes an open stage at once and for good. It asks no lane: a creator stops its own sale whatever is paused.
- OID
- 04d01e…0246:20
EndStage details
priceAt
func(s v1.stage, now int64) int64priceAt is the stage price at a time inside its window.
- OID
- 04d01e…0246:21
priceAt details
stageKey
func(id string, index int) string- OID
- 04d01e…0246:22
stageKey details
AllowlistLeaf
func(id string, index int, who .uverse.address, allowance int64) [32]uint8AllowlistLeaf is the Merkle leaf that lets who mint up to allowance tokens in one stage: sha256(0x00 || "launchpad-drop-v1|\<collection>|\<stage>|\<address>|\<allowance>"). Only the chain's spelling of an address makes a leaf: a list written in capitals would name accounts that can never claim.
- OID
- 04d01e…0246:23
AllowlistLeaf details
entitled
func(s v1.stage, id string, index int, buyer .uverse.address, allowance int64, proof string, gateNumber int64) (limit int64, gateKey string)entitled checks what the stage's kind requires of the buyer and returns how many tokens that wallet may mint in the stage. For a holder stage it also returns the key under which the gate token must be recorded as used.
- OID
- 04d01e…0246:24
entitled details
Mint
func(id string, index int, currencyKey string, offered int64, allowance int64, proof string, gateNumber int64) int64Mint sells the caller one token of an open stage and returns its number. currencyKey and offered are what the caller accepts to pay: the stage must be priced in that currency, and offered is the most it will take. Native coins are attached for exactly offered and the difference with the price comes back, which is what makes a falling price payable; a token is pulled for exactly the price. The price is split between the treasury (the fee pinned on the stage) and the creator. allowance and proof are for an allowlist stage, gateNumber for a holder stage; elsewhere they are zero and empty.
- OID
- 04d01e…0246:25
Mint details
Render
func(path string) string- OID
- 04d01e…0246:26
Render details
terms
typeterms is what this realm needs from config.
Value
v1.terms
termsOf
func(currencyKey string) v1.termstermsOf reads the terms in force. The collection fee is -1 for a currency that has none.
- OID
- 04d01e…0246:27
termsOf details
policy
func(lane string, currencyKey string) v1.termspolicy returns the terms in force after checking that the lane is open for the currency. It is a variable only so that unit tests can stand in for the config realm, whose admin cannot be set from another package's tests.
- OID
- 04d01e…0246:30
policy details
balance
func(key string) int64balance reads one denomination, so coins of other denominations sent to the realm never add to the cost of a payment.
- OID
- 04d01e…0246:31
balance details
take
func(key string, price int64, offered int64) int64take collects price from the direct caller and returns what the realm held before. Native coins come attached: the caller attaches exactly offered, at least the price, and the difference goes straight back. A token is pulled for exactly the price.
- OID
- 04d01e…0246:32
take details
pay
func(key string, to .uverse.address, amount int64)- OID
- 04d01e…0246:33
pay details
settled
func(key string, held int64)settled aborts the transaction unless everything taken has been paid out: the realm must hold exactly what it held before the call.
- OID
- 04d01e…0246:34
settled details
num
func(n int64) string- OID
- 04d01e…0246:35
num details
StagesJSON
func(id string) stringStagesJSON lists a collection's stages in index order. "currentPrice" is the price a mint would pay now, and is only meaningful while "open" is true.
- OID
- 04d01e…0246:37
StagesJSON details
MintedBy
func(id string, index int, who string) int64MintedBy is how many tokens who has minted in a stage. Only the chain's spelling of an address is an account: any other is refused, never read as 0.
- OID
- 04d01e…0246:38
MintedBy details
GateUsed
func(id string, index int, gateNumber int64) boolGateUsed reports whether a gate token has already paid for a mint in a holder stage.
- OID
- 04d01e…0246:39
GateUsed details
TermsJSON
func(currencyKey string) stringTermsJSON is what creating a collection and scheduling a stage cost now: the collection fee in a currency and the protocol fee a new stage would pin. A value of -1 means the lane is closed; config's ActionStatusJSON tells whether a lane accepts new actions right now.
- OID
- 04d01e…0246:40