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.

rooms package

Overview

Package rooms is the on-chain trade window.

Two parties share a room. Each one puts assets on their own side: native coins (GNOT and any other bank denom), GRC20 tokens from the registry at gno.land/r/nt/grc20reg/v0, and GRC721 NFTs from collections registered with this realm (see RegisterCollection). The realm holds the deposits.

Every change to the room raises its version. A party locks the room by naming the exact version they reviewed, so a lock can never apply to contents the party has not seen. When both sides hold a lock on the current version, the second lock swaps everything in the same transaction: the maker's side goes to the taker and the taker's side goes to the maker.

Until that moment each party can withdraw their own deposits, and either party can cancel the room, which returns every deposit to its owner. An expired room can no longer settle; its deposits stay withdrawable, and anyone may cancel it to send them home.

A maker can also turn a room into an offer (see Offer): their side plus an exact list of what they want in return. The first account allowed to take the other seat that puts in exactly that list completes the trade in one transaction (see Fill).

On settlement the realm keeps a service fee on coins and tokens (see fee.gno); NFTs, withdrawals and cancellations pay nothing.

Functions

AcceptAdmin

func AcceptAdmin(cur realm)
Ask AI Claude ChatGPT

AcceptAdmin completes a handover started with ProposeAdmin.

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/rooms" -func "AcceptAdmin" -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/rooms" -func "AcceptAdmin" -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
  

Address

func Address() string
Ask AI Claude ChatGPT

Address returns this realm's address: the spender to approve before DepositToken, and the account that holds deposits.

Command

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

Result

Admin

func Admin() string
Ask AI Claude ChatGPT

Admin returns the current admin address, or "" when there is none.

Command

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

Result

BalancesJSON

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

BalancesJSON lists the registered GRC20 tokens that owner holds, with the balance and the allowance to this realm: a wallet's inventory in one query. A page covers limit registry entries (at most 50); read on while "more" is true.

Params

Command

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

Result

Cancel

func Cancel(cur realm, roomID uint64)
Ask AI Claude ChatGPT

Cancel closes an open room and returns every deposit to its owner. Either party may cancel at any time before settlement; once the room has expired, anyone may cancel 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/rooms" -func "Cancel" -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/rooms" -func "Cancel" -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
  

CollectionsJSON

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

CollectionsJSON lists the GRC721 collections registered with rooms.

Params

Command

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

Result

DepositCoins

func DepositCoins(cur realm, roomID uint64)
Ask AI Claude ChatGPT

DepositCoins adds the coins sent with this call to the caller's side. It must be called directly from the depositing account (maketx call or a wallet MsgCall), because only then are the sent coins guaranteed to have reached this realm.

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/rooms" -func "DepositCoins" -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/rooms" -func "DepositCoins" -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
  

DepositNFT

func DepositNFT(cur realm, roomID uint64, collectionKey string, tokenID string)
Ask AI Claude ChatGPT

DepositNFT moves one NFT of a registered collection from the caller to this realm and adds it to the caller's side. The caller must first approve this realm's address (see Address) for that token id, in the collection's realm.

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/rooms" -func "DepositNFT" -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/rooms" -func "DepositNFT" -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
  

DepositToken

func DepositToken(cur realm, roomID uint64, tokenKey string, amount int64)
Ask AI Claude ChatGPT

DepositToken moves amount of a registered GRC20 token from the caller to this realm and adds it to the caller's side. The caller must first approve this realm's address (see Address) for at least amount.

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/rooms" -func "DepositToken" -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/rooms" -func "DepositToken" -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
  

FeeBps

func FeeBps() uint64
Ask AI Claude ChatGPT

FeeBps returns the rate a room opened now would get.

Command

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

Result

Fill

func Fill(cur realm, roomID uint64, version uint64)
Ask AI Claude ChatGPT

Fill completes an offer: the caller takes the other seat, puts in exactly what the offer wants, and the room settles in this call. version is the version the caller reviewed. Coins in the offer must be attached to this call, from the caller's own account.

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/rooms" -func "Fill" -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/rooms" -func "Fill" -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
  

IsPaused

func IsPaused() bool
Ask AI Claude ChatGPT

IsPaused reports whether new activity is stopped.

Command

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

Result

IsVerified

func IsVerified(kind, denom string) bool
Ask AI Claude ChatGPT

IsVerified reports whether an asset counts as verified now. denom is a coin denom, a registry key, or a collection key (with or without "#token id").

Params

Command

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

Result

Join

func Join(cur realm, roomID uint64)
Ask AI Claude ChatGPT

Join takes the open taker seat of a room.

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/rooms" -func "Join" -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/rooms" -func "Join" -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
  

LatestJSON

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

LatestJSON lists all rooms, newest first.

Params

Command

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

Result

Lock

func Lock(cur realm, roomID uint64, version uint64) string
Ask AI Claude ChatGPT

Lock records that the caller agrees to swap the room exactly as it is at version. It fails if the room has changed since. When the other side already holds a lock on the same version, this call settles the room and returns "settled"; otherwise it returns "locked".

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/rooms" -func "Lock" -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/rooms" -func "Lock" -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
  

NFTJSON

func NFTJSON(collectionKey string, tokenID string) string
Ask AI Claude ChatGPT

NFTJSON describes one NFT of a registered collection: who owns it, and whether this realm is approved to move it. null when the collection is not registered or the token does not exist.

Params

Command

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

Result

Offer

func Offer(cur realm, roomID uint64, version uint64, want string) uint64
Ask AI Claude ChatGPT

Offer turns the room into an offer for exactly want, on the room as it is at version. want lists one asset per line, at most 8:

Example
1coin <amount> <denom>
2token <amount> <grc20reg key>
3nft 1 <collection key>#<token id>

Amounts are in base units. Returns the new version, which the taker fills.

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/rooms" -func "Offer" -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/rooms" -func "Offer" -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
  

Open

func Open(cur realm, counterparty string, ttlMinutes int) uint64
Ask AI Claude ChatGPT

Open creates a room with the caller as maker and returns its id. The room takes only verified assets (see Verify). counterparty is the taker's address, or "" to leave the seat open for the first account that calls Join. ttlMinutes is how long the room can settle; 0 means 24 hours, and the allowed range is 10 minutes to 7 days.

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/rooms" -func "Open" -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/rooms" -func "Open" -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
  

OpenMarket

func OpenMarket(cur realm, counterparty string, ttlMinutes int) uint64
Ask AI Claude ChatGPT

OpenMarket is Open for a room that takes any registered asset, verified or not. Both parties trade unverified assets at their own risk; the app says so in every view of such a room.

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/rooms" -func "OpenMarket" -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/rooms" -func "OpenMarket" -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
  

OwnedJSON

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

OwnedJSON lists the NFTs owner holds in registered collections that can be listed (those registered with their enumerable view), at most 20 per collection, and whether this realm is approved for each. A page covers limit collections; read on while "more" is true.

Params

Command

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

Result

ProposeAdmin

func ProposeAdmin(cur realm, next string)
Ask AI Claude ChatGPT

ProposeAdmin names the next admin; the change happens when that address calls AcceptAdmin. Pass "" to withdraw a proposal.

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/rooms" -func "ProposeAdmin" -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/rooms" -func "ProposeAdmin" -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
  

RegisterCollection

func RegisterCollection(cur realm, token *grc721.Token, list *enumerable.Enumerable) string
Ask AI Claude ChatGPT

RegisterCollection makes a GRC721 collection tradable in rooms and returns its key. Only the collection's own realm can register it, once; list is its enumerable view, or nil. A collection's realm also lets owners approve this realm (see Address) for one token id, as its own Approve does; DepositNFT spends that approval.

Example
1key := rooms.RegisterCollection(cross(cur), Token, List)

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/rooms" -func "RegisterCollection" -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/rooms" -func "RegisterCollection" -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 the realm on gnoweb: the home page lists recent rooms, and room/<id> shows one room. Every value that comes from a caller goes through sanitize before it reaches the markdown.

Param

Command

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

Result

RoomJSON

func RoomJSON(id uint64) string
Ask AI Claude ChatGPT

RoomJSON returns one room, or null when it does not exist.

Param

Command

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

Result

RoomsOfJSON

func RoomsOfJSON(addr string, offset, limit int) string
Ask AI Claude ChatGPT

RoomsOfJSON lists the rooms where addr is maker or taker, newest first.

Params

Command

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

Result

SetFee

func SetFee(cur realm, bps uint64)
Ask AI Claude ChatGPT

SetFee sets the rate for rooms opened from now on, in basis points (50 is 0.5%), at most MaxFeeBps. Rooms already open keep their rate.

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/rooms" -func "SetFee" -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/rooms" -func "SetFee" -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
  

SetPaused

func SetPaused(cur realm, value bool)
Ask AI Claude ChatGPT

SetPaused stops or resumes new activity.

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/rooms" -func "SetPaused" -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/rooms" -func "SetPaused" -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
  

SetTreasury

func SetTreasury(cur realm, to string)
Ask AI Claude ChatGPT

SetTreasury names the account that receives fees from now on.

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/rooms" -func "SetTreasury" -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/rooms" -func "SetTreasury" -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
  

StatsJSON

func StatsJSON() string
Ask AI Claude ChatGPT

StatsJSON returns counters and the settled volume per asset.

Command

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

Result

TokenJSON

func TokenJSON(key string, owner string) string
Ask AI Claude ChatGPT

TokenJSON describes one registered token and, when owner is given, the owner's balance and current allowance to this realm.

Params

Command

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

Result

TokensJSON

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

TokensJSON lists GRC20 tokens from the registry that rooms accept.

Params

Command

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

Result

Treasury

func Treasury() string
Ask AI Claude ChatGPT

Treasury returns the account that receives fees, or "" when fees are off.

Command

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

Result

Unlock

func Unlock(cur realm, roomID uint64)
Ask AI Claude ChatGPT

Unlock withdraws the caller's lock on the current version.

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/rooms" -func "Unlock" -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/rooms" -func "Unlock" -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
  

Unverify

func Unverify(cur realm, kind, key, reason string)
Ask AI Claude ChatGPT

Unverify removes a verification at once. Ordinary rooms stop accepting the asset, and those that hold it can no longer settle; deposits stay withdrawable. reason is public.

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/rooms" -func "Unverify" -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/rooms" -func "Unverify" -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
  

VerifiedJSON

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

VerifiedJSON lists verifications, counted or still waiting, with their public reasons.

Params

Command

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

Result

Verify

func Verify(cur realm, kind, key, reason string)
Ask AI Claude ChatGPT

Verify makes a coin denom, a registered GRC20 token or a registered NFT collection acceptable in ordinary rooms from VerifyDelay from now. kind is coin, token or nft; key is the denom, the registry key or the collection key. reason is public: say why this asset is safe to trade.

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/rooms" -func "Verify" -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/rooms" -func "Verify" -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
  

WithdrawCoins

func WithdrawCoins(cur realm, roomID uint64, denom string, amount int64)
Ask AI Claude ChatGPT

WithdrawCoins returns amount of denom from the caller's side to the caller. It works while the room is open, also after it has expired or while the realm is paused.

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/rooms" -func "WithdrawCoins" -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/rooms" -func "WithdrawCoins" -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
  

WithdrawNFT

func WithdrawNFT(cur realm, roomID uint64, collectionKey string, tokenID string)
Ask AI Claude ChatGPT

WithdrawNFT returns one NFT from the caller's side to the caller. Same rules as WithdrawCoins: it works while the room is open, also after it has expired or while the realm is paused.

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/rooms" -func "WithdrawNFT" -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/rooms" -func "WithdrawNFT" -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
  

WithdrawToken

func WithdrawToken(cur realm, roomID uint64, tokenKey string, amount int64)
Ask AI Claude ChatGPT

WithdrawToken returns amount of a GRC20 token from the caller's side to the caller. Same rules as WithdrawCoins.

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/rooms" -func "WithdrawToken" -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/rooms" -func "WithdrawToken" -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
  

Gno Expression Evaluator

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