Denom
untyped stringDenom is the only asset this realm accepts.
Value
"ugnot"
MaxFeeBps
int64MaxFeeBps is the hard protocol-fee cap: 1000 bps = 10%.
Value
1000
AcceptanceBlocks
int64AcceptanceBlocks is how long a customer has to accept a delivery before anyone may release it to the provider. It is a PROTOCOL constant on purpose — see the header. ~7 days at pearl's observed ~4.2s blocks.
Value
140000
ServiceActive
untyped stringService status values.
Value
"active"
ServiceRetired
untyped stringService status values.
Value
"retired"
OrderPurchased
untyped stringOrder status values. Released and Refunded are terminal.
Value
"purchased"
OrderDelivered
untyped stringOrder status values. Released and Refunded are terminal.
Value
"delivered"
OrderReleased
untyped stringOrder status values. Released and Refunded are terminal.
Value
"released"
OrderRefunded
untyped stringOrder status values. Released and Refunded are terminal.
Value
"refunded"
MaxTitleLen
untyped bigintInput bounds.
Value
(80 <untyped> bigint)
MaxDescLen
untyped bigintInput bounds.
Value
(2000 <untyped> bigint)
MaxURILen
untyped bigintInput bounds.
Value
(400 <untyped> bigint)
MinPrice
int64Input bounds.
Value
1
MinDeliveryBlocks
int64Input bounds.
Value
850
MaxDeliveryBlocks
int64Input bounds.
Value
1200000
MaxServicesPerProvider
untyped bigintInput bounds.
Value
(20 <untyped> bigint)
RenderLimit
untyped bigintInput bounds.
Value
(20 <untyped> bigint)
service
typeValue
service_market.service
order
typeValue
service_market.order
admin
.uverse.address// may set fee, fee recipient, stage successor
Value
<gnolang.StringValue>
pendingAdmin
.uverse.address// staged by TransferAdmin, completes via AcceptAdmin
Value
<zero>
feeRecipient
.uverse.address// may withdraw fees and sweep surplus
Value
<gnolang.StringValue>
feeBps
int64// fee snapshotted into NEW services
Value
500
self
.uverse.address// this realm's address, captured at deploy
Value
<gnolang.StringValue>
nextService
int64Value
1
nextOrder
int64Value
2
escrowTotal
int64// == Σ amount over Purchased and Delivered orders
Value
0
services
*v0.Tree// padID(id) -> \*service
- OID
- 00b940…bcd2:12
services details
orders
*v0.Tree// padID(id) -> \*order
- OID
- 00b940…bcd2:15
orders details
providerNum
*v0.Tree// address -> \*int64, services per provider
- OID
- 00b940…bcd2:18
providerNum details
ledger
*feeledger.Ledger- OID
- 00b940…bcd2:21
ledger details
init.31
func()- OID
- 00b940…bcd2:25
init.31 details
RegisterService
func(title string, description string, price int64, deliveryBlocks int64, maxFeeBps int64) int64RegisterService publishes a standing offer and returns its id. No coins are accepted; the storage deposit the caller pays is the anti-spam. The current protocol fee is snapshotted into the service and must not exceed maxFeeBps, the ceiling the provider signed for — pass MaxFeeBps to accept any legal fee. Providers may be EOAs or realms, but a realm provider takes on three obligations that this realm cannot check for it. Realm bytes are immutable after addpkg, so a realm deployed without them cannot acquire them later: failing (1) means it never earns, failing (2) or (3) means what it earned is permanently stranded. 1. It must already expose a crossing entrypoint that calls MarkDelivered. That is the only transition to OrderDelivered, and both release paths require it, so a provider realm that cannot call it never earns a credit at all — every order against it runs to ClaimRefund instead. This obligation binds before the next one. 2. It must already expose a crossing entrypoint that calls Claim or ClaimAll on this realm. A credited balance is a pull, never a push; nothing here can reach into a provider realm to deliver it. 3. It must make both calls in transactions whose ORIGIN carried no -send, per the REALM-CALLER CAVEAT in the package header. The customer side is not symmetric: PurchaseService is payable and routes through coinio.Receive, which requires an EOA calling directly via MsgCall. A realm can therefore sell a service here but cannot buy one — and "can sell" is exactly as strong as the three obligations above, no stronger. A customer is structurally always an EOA, which is why the permissionless valves are always pullable.
- OID
- 00b940…bcd2:27
RegisterService details
RetireService
func(id int64)RetireService stops a service accepting NEW orders. Orders already in flight keep their own copies of provider, amount and fee, and run to their own terminal states unaffected. Provider only, and terminal — there is no un-retire, so a customer reading "active" cannot have it flicker underneath them.
- OID
- 00b940…bcd2:28
RetireService details
PurchaseService
func(serviceID int64) int64PurchaseService escrows EXACTLY the listed price and opens an order. The caller must be an EOA (coinio.Receive is the receipt-guaranteed shape) and must attach exactly the price in ugnot; any mismatch aborts and the coins revert with the transaction. Self-purchase is rejected.
- OID
- 00b940…bcd2:29
PurchaseService details
MarkDelivered
func(orderID int64, uri string)MarkDelivered records that the work is done and starts the acceptance window. Provider only. The uri is an opaque reference to the deliverable; this realm neither fetches nor interprets it, and it is sanitized on the way out to Render. Delivering AFTER the delivery deadline is allowed as long as nobody has yet called ClaimRefund — late work the customer still wants should not be destroyed by a deadline that exists to protect the customer. The customer's remedy is unchanged: they simply do not accept, and the refund valve stays open right up until this transition lands.
- OID
- 00b940…bcd2:30
MarkDelivered details
AcceptDelivery
func(orderID int64)AcceptDelivery is THE RESOLUTION: the customer accepts the delivered work and the escrow becomes the provider's claimable balance, minus the fee snapshotted into the order at purchase. Customer only.
- OID
- 00b940…bcd2:31
AcceptDelivery details
ReleaseTimeout
func(orderID int64)ReleaseTimeout releases a delivered order to the provider once the acceptance window has lapsed. Permissionless: a customer who stops responding must not be able to strand a provider's completed work. This is deemed acceptance, and it is the only path by which escrow reaches a provider without the customer's explicit act.
- OID
- 00b940…bcd2:32
ReleaseTimeout details
DeclineOrder
func(orderID int64)DeclineOrder returns the escrow to the customer before delivery. Provider only, fee-free — a provider who cannot fulfil should be able to hand the money straight back rather than wait out a deadline. Safe to allow unilaterally because it only ever moves value AWAY from the caller.
- OID
- 00b940…bcd2:33
DeclineOrder details
ClaimRefund
func(orderID int64)ClaimRefund returns the escrow to the customer once the provider has missed the delivery deadline. Permissionless: a provider who abandons an order must not be able to strand the customer's money. It is fee-free. Charging a protocol fee on a refund would mean the marketplace profits from provider non-performance.
- OID
- 00b940…bcd2:34
ClaimRefund details
Claim
func(amount int64)Claim sends amount ugnot of the caller's claimable balance back to the caller.
- OID
- 00b940…bcd2:35
Claim details
ClaimAll
func()ClaimAll sends the caller's entire claimable balance back to the caller. Fails if there is nothing to claim.
- OID
- 00b940…bcd2:36
ClaimAll details
WithdrawFees
func()WithdrawFees sends the accrued fee pot to the fee recipient. Only the fee recipient may call it.
- OID
- 00b940…bcd2:37
WithdrawFees details
SweepDenom
func(denom string)SweepDenom sends the surplus of a single denomination to the fee recipient. For ugnot only the excess over Liabilities() moves — which reserves live escrow as well as claimable balances and the fee pot — and other denoms move wholly. Only the fee recipient may call it.
- OID
- 00b940…bcd2:38
SweepDenom details
SetFeeBps
func(bps int64)SetFeeBps sets the protocol fee snapshotted into FUTURE services. Existing services, and every order already placed against them, keep the fee they were created under. Admin only; bounded by \[0, MaxFeeBps].
- OID
- 00b940…bcd2:39
SetFeeBps details
SetFeeRecipient
func(next .uverse.address)SetFeeRecipient sets the address that may withdraw fees and sweep surplus. Admin only.
- OID
- 00b940…bcd2:40
SetFeeRecipient details
TransferAdmin
func(next .uverse.address)TransferAdmin stages a successor. Two-step: the successor must call AcceptAdmin, so a typo cannot orphan the realm. Admin only. Passing the zero address cancels a pending nomination; any other value must be a well-formed address, for parity with SetFeeRecipient. The two-step handover already made a malformed nominee harmless — it could never call AcceptAdmin — so this check rejects the typo at the point it is made rather than leaving it staged and readable as a real nomination.
- OID
- 00b940…bcd2:41
TransferAdmin details
AcceptAdmin
func()AcceptAdmin completes a staged handover. Only the nominee may call it.
- OID
- 00b940…bcd2:42
AcceptAdmin details
ServiceInfo
func(id int64) (provider .uverse.address, title string, price int64, deliveryBlocks int64, feeBps int64, status string, orderCount int64)- OID
- 00b940…bcd2:43
ServiceInfo details
ServiceDescription
func(id int64) string- OID
- 00b940…bcd2:44
ServiceDescription details
OrderInfo
func(id int64) (serviceID int64, customer .uverse.address, provider .uverse.address, amount int64, feeBps int64, status string)- OID
- 00b940…bcd2:45
OrderInfo details
OrderDeadlines
func(id int64) (deliveryDeadline int64, acceptanceDeadline int64)OrderDeadlines returns the two absolute heights that govern an order. acceptanceDeadline is 0 until the order is delivered.
- OID
- 00b940…bcd2:46
OrderDeadlines details
OrderURI
func(id int64) string- OID
- 00b940…bcd2:47
OrderURI details
Quote
func(id int64) (price int64, fee int64, toProvider int64)Quote reports what a purchase of this service would cost and what the provider would receive on resolution, at the service's snapshotted fee.
- OID
- 00b940…bcd2:48
Quote details
Admin
func() .uverse.address- OID
- 00b940…bcd2:49
Admin details
PendingAdmin
func() .uverse.address- OID
- 00b940…bcd2:50
PendingAdmin details
FeeRecipient
func() .uverse.address- OID
- 00b940…bcd2:51
FeeRecipient details
FeeBps
func() int64- OID
- 00b940…bcd2:52
FeeBps details
NumServices
func() int64- OID
- 00b940…bcd2:53
NumServices details
NumOrders
func() int64- OID
- 00b940…bcd2:54
NumOrders details
ServicesOf
func(a .uverse.address) int64- OID
- 00b940…bcd2:55
ServicesOf details
BalanceOf
func(addr .uverse.address) int64- OID
- 00b940…bcd2:56
BalanceOf details
UsersTotal
func() int64- OID
- 00b940…bcd2:57
UsersTotal details
FeesAccrued
func() int64- OID
- 00b940…bcd2:58
FeesAccrued details
EscrowTotal
func() int64EscrowTotal is the live escrow pool E: the sum of every order still in Purchased or Delivered.
- OID
- 00b940…bcd2:59
EscrowTotal details
Liabilities
func() int64Liabilities is everything this realm owes: live escrow, claimable balances and the fee pot. SweepDenom reserves exactly this.
- OID
- 00b940…bcd2:60
Liabilities details
Held
func() int64- OID
- 00b940…bcd2:61
Held details
Surplus
func() int64- OID
- 00b940…bcd2:62
Surplus details
Address
func() .uverse.address- OID
- 00b940…bcd2:63
Address details
Height
func() int64- OID
- 00b940…bcd2:64
Height details
Render
func(path string) string- OID
- 00b940…bcd2:65
Render details
renderService
func(arg string) string- OID
- 00b940…bcd2:66
renderService details
renderOrder
func(arg string) string- OID
- 00b940…bcd2:67
renderOrder details
realmPath
untyped stringValue
"/r/g1ut6uspuh73e02yauxpmyt8g3wwddaq8utagvm3/service_market"
release
func(o *service_market.order, reason string)release moves an order's escrow into the provider's claimable balance at the order's snapshotted fee, and drives the order terminal. The status write and the escrow decrement happen together with the credit, so no order can be released twice and E stays exactly Σ open amounts.
- OID
- 00b940…bcd2:68
release details
refund
func(o *service_market.order, reason string)refund moves an order's escrow into the customer's claimable balance at ZERO fee and drives the order terminal.
- OID
- 00b940…bcd2:69
refund details
assertNoSend
func()assertNoSend refuses coins on non-payable entrypoints: an accidental -send would otherwise strand at the realm as sweep-only surplus. PurchaseService is the only payable function. NOTE: this reads the ORIGIN envelope — see the realm-provider caveat in the header.
- OID
- 00b940…bcd2:70
assertNoSend details
assertAdmin
func(caller .uverse.address)- OID
- 00b940…bcd2:71
assertAdmin details
mustGetService
func(id int64) *service_market.service- OID
- 00b940…bcd2:72
mustGetService details
mustGetOrder
func(id int64) *service_market.order- OID
- 00b940…bcd2:73
mustGetOrder details
countFor
func(a .uverse.address) int64countFor reports how many ACTIVE services an address holds.
- OID
- 00b940…bcd2:74
countFor details
bumpFor
func(a .uverse.address, delta int64)bumpFor adjusts the active-service counter, removing the entry at zero so a provider who retires everything stops paying for the slot.
- OID
- 00b940…bcd2:75
bumpFor details
assertValidTitle
func(title string)assertValidTitle bounds length and restricts the charset so titles are list-safe in Render without escaping.
- OID
- 00b940…bcd2:76
assertValidTitle details
padID
func(id int64) stringpadID renders an id as a fixed-width key so avl iteration order is numeric order.
- OID
- 00b940…bcd2:77
padID details
checkedAdd
func(a int64, b int64) (int64, bool)- OID
- 00b940…bcd2:78
checkedAdd details
itoa
func(n int64) string- OID
- 00b940…bcd2:79