scale
int64Value
1000000
maxInt64
int64Value
9223372036854775807
Market
typeAll amounts are integer ugnot. One million micro-shares is one share; a winning micro-share pays one ugnot (one whole share pays one GNOT).
Value
markets.Market
QuotePoint
typeQuotePoint records one published fixed quote. The history contains the creation quote and every later administrator requote, in block-time order.
Value
markets.QuotePoint
Position
typeValue
markets.Position
marketRecord
typeValue
markets.marketRecord
maxHistory
untyped bigintValue
(240 <untyped> bigint)
administrator
.uverse.addressOriginCaller is used only at package initialization, to capture the deployer. Entry-point authorization always uses the live immediate caller.
Value
<gnolang.StringValue>
pendingAdministrator
.uverse.addressValue
<gnolang.StringValue>
records
map[string]*markets.marketRecord- OID
- 06bd31…69a1:6
records details
marketIDs
[]string- OID
- 06bd31…69a1:361
marketIDs details
totalEscrowUgnot
int64Value
323500000
Administrator
func() .uverse.address- OID
- 06bd31…69a1:9
Administrator details
PendingAdministrator
func() .uverse.address- OID
- 06bd31…69a1:11
PendingAdministrator details
ProposeAdministrator
func(next .uverse.address)ProposeAdministrator starts a two-step handover. The proposed address must accept from its own direct user call, so a mistyped address cannot take over. Each market keeps the oracle it was created with.
- OID
- 06bd31…69a1:12
ProposeAdministrator details
AcceptAdministrator
func()AcceptAdministrator completes the handover started by ProposeAdministrator.
- OID
- 06bd31…69a1:13
AcceptAdministrator details
CreateMarket
func(id string, question string, rules string, conditionID string, yesTokenID string, noTokenID string, closesAt int64, yesPricePpm int64, oracle .uverse.address)CreateMarket freezes every field used to match an external result. There are deliberately no question/rules/source/oracle/price update functions.
- OID
- 06bd31…69a1:14
CreateMarket details
SetQuote
func(id string, yesPricePpm int64, expectedVersion int64)SetQuote publishes a new fixed quote while trading is open. expectedVersion prevents an operator from overwriting a quote it has not seen. Every Buy still checks the exact price its buyer reviewed.
- OID
- 06bd31…69a1:15
SetQuote details
Fund
func(id string)Fund adds non-refundable reserve capital, allocated solely to this market. No withdrawal or banker capability is exposed, even to the administrator.
- OID
- 06bd31…69a1:16
Fund details
Buy
func(id string, outcome string, microShares int64, expectedPricePpm int64)Buy creates positions only after exact payment and full market-specific collateral coverage. expectedPricePpm is the selected outcome's captured price.
- OID
- 06bd31…69a1:17
Buy details
FinalizeByOracle
func(id string, conditionID string, rulesHash string, yesTokenID string, noTokenID string, winner string, evidenceHash string)FinalizeByOracle accepts only the pinned oracle and the entire immutable source binding. EvidenceHash commits to an externally verified final record. Neither a price threshold nor an unverified API response can call this by itself. A source can resolve before the planned closing date. Oracle finalization therefore closes trading immediately, without waiting for that deadline.
- OID
- 06bd31…69a1:18
FinalizeByOracle details
Claim
func(id string) int64Claim pays only the immediate caller's winning shares. Repeated calls abort; a losing position can be closed once with zero payout. A panic rolls back both state and bank effects in the Gno transaction.
- OID
- 06bd31…69a1:19
Claim details
GetMarket
func(id string) markets.Market- OID
- 06bd31…69a1:20
GetMarket details
GetPosition
func(id string, owner .uverse.address) markets.Position- OID
- 06bd31…69a1:21
GetPosition details
Quote
func(id string, outcome string, microShares int64) int64- OID
- 06bd31…69a1:22
Quote details
ListMarkets
func() []markets.Market- OID
- 06bd31…69a1:23
ListMarkets details
MarketJSON
func(id string) stringGno 1.5.0 does not include encoding/json. These read-only projections use explicit fields and JSON string escaping, without an external package.
- OID
- 06bd31…69a1:24
MarketJSON details
MarketsJSON
func() stringMarketsJSON returns every market in creation order as one JSON array.
- OID
- 06bd31…69a1:25
MarketsJSON details
PositionsJSON
func(owner .uverse.address) stringPositionsJSON returns the owner's positions across all markets, in market creation order. Markets where the owner never bought are omitted.
- OID
- 06bd31…69a1:26
PositionsJSON details
historyJSON
func(points []markets.QuotePoint) string- OID
- 06bd31…69a1:27
historyJSON details
QuoteHistory
func(id string) []markets.QuotePointQuoteHistory returns a detached copy of the published quotes.
- OID
- 06bd31…69a1:28
QuoteHistory details
ppmPrice
func(value int64) stringppmPrice formats an integer in millionths with six fixed decimals.
- OID
- 06bd31…69a1:29
ppmPrice details
PositionJSON
func(id string, owner .uverse.address) string- OID
- 06bd31…69a1:30
PositionJSON details
decimal
func(value int64) string- OID
- 06bd31…69a1:31
decimal details
jsonString
func(value string) string- OID
- 06bd31…69a1:32
jsonString details
BindingHash
func(question string, rules string) stringHash UTF-8 length-framed text, shared exactly with the backend source binding.
- OID
- 06bd31…69a1:33
BindingHash details
assertUser
func(int, context .uverse.realm)- OID
- 06bd31…69a1:34
assertUser details
assertNoSend
func()- OID
- 06bd31…69a1:35
assertNoSend details
singleSend
func() int64- OID
- 06bd31…69a1:36
singleSend details
assertBankCoverage
func(int, context .uverse.realm, required int64)- OID
- 06bd31…69a1:37
assertBankCoverage details
mustMarket
func(id string) *markets.marketRecord- OID
- 06bd31…69a1:38
mustMarket details
outcomePrice
func(m markets.Market, outcome string) int64- OID
- 06bd31…69a1:39
outcomePrice details
quoteCost
func(microShares int64, price int64) int64- OID
- 06bd31…69a1:40
quoteCost details
checkedAdd
func(a int64, b int64) int64- OID
- 06bd31…69a1:41
checkedAdd details
maximum
func(a int64, b int64) int64- OID
- 06bd31…69a1:42
maximum details
require
func(ok bool, message string)- OID
- 06bd31…69a1:43
require details
isHash
func(s string) bool- OID
- 06bd31…69a1:44
isHash details
isTokenID
func(s string) bool- OID
- 06bd31…69a1:45
isTokenID details
appURL
untyped stringappURL is the exchange interface; the realm page links to it for trading.
Value
"https://six-seven-67-phi.vercel.app"
pagePath
stringpagePath is this realm's gnoweb path ("/r/\<namespace>/markets"), captured at deployment so links between its pages work on any chain and namespace.
Value
"/r/nym-sixseven067/markets"
historyRows
untyped biginthistoryRows is how many recent quotes a market page lists.
Value
(10 <untyped> bigint)
Render
func(path string) stringRender draws the realm's public page on gnoweb: the market list at the root and one page per market at ":\<id>". It is informational; the app reads JSON.
- OID
- 06bd31…69a1:47
Render details
renderIndex
func() string- OID
- 06bd31…69a1:49
renderIndex details
renderMarket
func(r *markets.marketRecord) string- OID
- 06bd31…69a1:50
renderMarket details
status
func(m markets.Market) string- OID
- 06bd31…69a1:51
status details
priceText
func(value int64) stringpriceText formats millionths like the app: at least two decimals, no trailing zeros beyond them (420000 is "0.42", 425000 is "0.425").
- OID
- 06bd31…69a1:52
priceText details
dayText
func(unix int64) string- OID
- 06bd31…69a1:53
dayText details
timeText
func(unix int64) string- OID
- 06bd31…69a1:54
timeText details
countText
func(n int64, one string, many string) string- OID
- 06bd31…69a1:55
countText details
escapeText
func(s string) stringescapeText keeps question and rules text literal in Markdown, tables included.
- OID
- 06bd31…69a1:56
escapeText details
escapeCode
func(s string) stringescapeCode keeps an untrusted path inside one inline code span.
- OID
- 06bd31…69a1:57