Skip to content Search Apps Documentation Source Content Run Reset Eval Playground 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.

board package

Overview

Package board is the public OTC board of Trade Window.

A listing says what its owner gives and what they want, in their own words. It holds no assets and promises nothing: a deal happens only when both parties open a room in gno.land/r/tradewindow/rooms (or wherever that realm is deployed) and lock the same version of it. Contact details never belong here; everything in this realm is public forever.

Functions

Close

func Close(cur realm, id uint64)
Ask AI Claude ChatGPT

Close takes a listing down. Only its owner can close it.

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-tradewindow001/board" -func "Close" -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-tradewindow001/board" -func "Close" -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
  

ListingJSON

func ListingJSON(id uint64) string
Ask AI Claude ChatGPT

ListingJSON returns one listing, or null.

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/nym-tradewindow001/board.ListingJSON()"

Result

ListingsOfJSON

func ListingsOfJSON(owner string, offset, limit int) string
Ask AI Claude ChatGPT

ListingsOfJSON lists every listing of one owner, newest first.

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/nym-tradewindow001/board.ListingsOfJSON(,,)"

Result

OpenJSON

func OpenJSON(side string, offset, limit int) string
Ask AI Claude ChatGPT

OpenJSON lists open listings, newest first. side filters by buy, sell or swap; "" means all.

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/nym-tradewindow001/board.OpenJSON(,,)"

Result

Post

func Post(cur realm, side, give, want, note string, days int) uint64
Ask AI Claude ChatGPT

Post publishes a listing and returns its id. side is buy, sell or swap; give and want are short phrases such as "50,000 GNOT"; note is optional. days is how long the listing stays up: 0 means 7, the most is 30.

Params

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-tradewindow001/board" -func "Post" -args $'' -args $'' -args $'' -args $'' -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-tradewindow001/board" -func "Post" -args $'' -args $'' -args $'' -args $'' -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
  

Render

func Render(path string) string
Ask AI Claude ChatGPT

Render shows open listings on gnoweb, and one listing at listing/<id>.

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/nym-tradewindow001/board.Render()"

Result

Gno Expression Evaluator

Evaluate any read-only Gno expression against gno.land/r/nym-tradewindow001/board, for example a function call with arguments.