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.

market/v1 package

Overview

Package market is the platform's immutable fixed-price market (design §2.5.4). It never holds a token: the seller approves this realm in core, the token stays in the seller's wallet, and Buy moves it through core's official grc721 RealmTeller in the same transaction that pays everyone. It never holds coins either (I-3).

Stale listings (RA H-2) cannot be bought: a listing pins the token's move counter at listing time, and Buy requires owner == seller and the counter unchanged (I-8). A listing that went stale never blocks the new owner: List overwrites it and anyone may CancelStale it.

Pause ("trade" in core) stops List and Buy only. Cancel, CancelStale and UpdatePrice are never paused (I-2).

Function

UpdatePrice

func UpdatePrice(cur realm, listingID string, price int64)
Ask AI Claude ChatGPT

UpdatePrice changes the price of a live listing; Buy's expectedPrice protects buyers from a change racing their purchase (RA M-10).

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/g19dzk54hhsdc3gllpksuj6gu4a3e6fl8cr6rn4w/minhwa2/market/v1" -func "UpdatePrice" -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/g19dzk54hhsdc3gllpksuj6gu4a3e6fl8cr6rn4w/minhwa2/market/v1" -func "UpdatePrice" -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