MaxPageSize
untyped bigintValue
(50 <untyped> bigint)
idWidth
untyped bigintValue
(12 <untyped> bigint)
priceWidth
untyped bigint// types.MaxUnitPrice has 16 digits
Value
(16 <untyped> bigint)
listing
typeValue
v1.listing
listings
v0.Tree// padded id -> \*listing
- OID
- 077c68…2623:4
listings details
byToken
v0.Tree// cid:tid -> id
- OID
- 077c68…2623:6
byToken details
byCollection
v0.Tree// cid:paddedPrice:paddedID -> id (floor = first key)
- OID
- 077c68…2623:8
byCollection details
bySeller
v0.Tree// seller:paddedID -> id
- OID
- 077c68…2623:10
bySeller details
nextID
int64Value
5
selfPath
string// captured in init for read paths without a cur
Value
"gno.land/r/g1pq6pxhgxk2uw5shg5le6glfydpxcu74k0zh069/sinopia/market/v1"
init.10
func()- OID
- 077c68…2623:13
init.10 details
List
func(cid string, tid string, price int64) stringList offers a token of a Final collection at price (ugnot). The caller must own it and have approved this realm (Approve or SetApprovalForAll in core). A stale listing of the same token is replaced.
- OID
- 077c68…2623:15
List details
UpdatePrice
func(listingID string, price int64)UpdatePrice changes the price of a live listing; Buy's expectedPrice protects buyers from a change racing their purchase (RA M-10).
- OID
- 077c68…2623:16
UpdatePrice details
Cancel
func(listingID string)Cancel removes the caller's listing. Never paused.
- OID
- 077c68…2623:17
Cancel details
CancelStale
func(listingID string)CancelStale lets anyone remove a listing that can no longer be bought.
- OID
- 077c68…2623:18
CancelStale details
Buy
func(listingID string, expectedPrice int64)Buy pays exactly expectedPrice for the listing (excess attached ugnot is refunded). Order: checks, remove the listing, move the token, then pay — protocol fee to the treasury, royalty to the collection's sub-treasury (then distributed to its payees), the rest to the seller. I-4: fee + royalty + seller + refund == attached.
- OID
- 077c68…2623:19
Buy details
Listing
func(listingID string) string- OID
- 077c68…2623:20
Listing details
ListingOf
func(cid string, tid string) stringListingOf is the live listing of a token as JSON, or "null".
- OID
- 077c68…2623:21
ListingOf details
ActiveListing
func(cid string, tid string) (id string, price int64, ok bool)ActiveListing is the typed read for other realms: the live listing of a token, if any.
- OID
- 077c68…2623:22
ActiveListing details
ListingsByCollection
func(cid string, offset int64, limit int64) stringListingsByCollection lists by ascending price. Stale listings are included with "live":false so pages stay stable; frontends hide them.
- OID
- 077c68…2623:23
ListingsByCollection details
ListingsBySeller
func(seller .uverse.address, offset int64, limit int64) string- OID
- 077c68…2623:24
ListingsBySeller details
Floor
func(cid string) int64Floor is the lowest live price in cid, or -1. It inspects at most MaxPageSize listings from the cheapest, so spam cannot make it unbounded.
- OID
- 077c68…2623:25
Floor details
Render
func(path string) string- OID
- 077c68…2623:26
Render details
live
func(l *v1.listing, market .uverse.address) boollive: still owned by the seller, not moved since listing, and the approval it was listed under is still in place and untouched since: a per-token listing dies with any later Approve of that token, an approval-for-all listing with any later SetApprovalForAll of the market by the seller — even one that approves again (SA-L3).
- OID
- 077c68…2623:27
live details
approvals
func(cid string, tid string, owner .uverse.address, market .uverse.address) (viaToken bool, viaAll bool)approvals reports whether market is approved for this token, and whether it is approved for all of owner's tokens.
- OID
- 077c68…2623:28
approvals details
remove
func(l *v1.listing, reason string)remove deletes a listing and its indexes; closed listings are not kept (RA L-6), the "Cancelled" event (reason sold/cancelled/stale) is the record.
- OID
- 077c68…2623:29
remove details
listPrefix
func(index *v0.Tree, prefix string, offset int64, limit int64) string- OID
- 077c68…2623:30
listPrefix details
writeListing
func(w *v1.JSONWriter, l *v1.listing)- OID
- 077c68…2623:31
writeListing details
writeListingLive
func(w *v1.JSONWriter, l *v1.listing, isLive bool)- OID
- 077c68…2623:32
writeListingLive details
mustListing
func(id int64) *v1.listing- OID
- 077c68…2623:33
mustListing details
assertSeller
func(l *v1.listing)- OID
- 077c68…2623:34
assertSeller details
assertTradeOpen
func()- OID
- 077c68…2623:35
assertTradeOpen details
assertPrice
func(price int64)- OID
- 077c68…2623:36
assertPrice details
received
func() int64- OID
- 077c68…2623:37
received details
assertNoDeposit
func()- OID
- 077c68…2623:38
assertNoDeposit details
pay
func(to .uverse.address, amount int64)- OID
- 077c68…2623:39
pay details
tokenKey
func(cid string, tid string) string- OID
- 077c68…2623:40
tokenKey details
collectionKey
func(l *v1.listing) string- OID
- 077c68…2623:41
collectionKey details
sellerKey
func(l *v1.listing) string- OID
- 077c68…2623:42
sellerKey details
prefixEnd
func(prefix string) stringprefixEnd is the smallest key greater than every key with this prefix (prefixes here end in ':', so bump it to ';').
- OID
- 077c68…2623:43
prefixEnd details
parseID
func(s string) int64- OID
- 077c68…2623:44
parseID details
itoa
func(n int64) string- OID
- 077c68…2623:45
itoa details
selfAddress
func() .uverse.address- OID
- 077c68…2623:46