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

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

markets/v2 package

Overview

Package markets is realm v2 of 67: fully collateralized markets on Gno with a service fee, two-sided expiring quotes, limits, pauses, a resolution window, void refunds and an abandonment exit. It does not discover outcomes: each market trusts its pinned oracle, and a guardian can cancel a proposal for 24 hours before anyone can make it final.

Money only leaves through Claim (to the holder who calls) and WithdrawSurplus (to the market's fixed treasury, after it is final). Nothing can pause them.

Function

Claim

func Claim(cur realm, id string) int64
Ask AI Claude ChatGPT

Claim settles the caller's position in a final market and deletes it. On Yes or No each winning micro-share pays one ugnot; on Void the holder gets back the cost and the fee they paid. A losing position closes with zero.

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/nym-sixseven067/markets/v2" -func "Claim" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "onyx-1" -remote "https://rpc.onyx.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.onyx.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nym-sixseven067/markets/v2" -func "Claim" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "onyx-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.onyx.testnets.gno.land" call.tx