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

gnofly package

Overview

Package gnofly is the market of gnofly's planes: a fixed-price book where a plane's owner lists it, anyone buys it, and each sale pays the planes realm's royalty (RoyaltyInfo: 5% to the gnofly treasury) out of the price.

It is a wrapper, not a collection: it mints nothing. The planes are the tokens of gno.land/r/g1t2kg2vtr3fukg43eujkn6x53gfdyakhngt4sfd/gnofly/nfts/planes, moved with that realm's TransferFrom. A seller first approves this realm there (Approve for one plane, or SetApprovalForAll); List then moves the plane here, in escrow, Buy hands it to the buyer and Cancel back to the seller.

Its calls and reads have the shapes Bazaar's site (bazaar.gnomi.fun) uses on a collection package (List, UpdatePrice, Cancel, Buy, Transfer; ListOpen, ItemLine, TokensOf, Minted), so that it can be registered there later, under the slug of its last path element. It is not registered, and pays Bazaar nothing.

It is version v0 of the market (the path's v0). SetPaused stops new listings for a move to a newer one; Cancel and Buy keep working, so no plane is ever stuck here.

Every write is a direct call from a wallet: no realm can list, buy or cancel in a user's name.

Function

List

func List(cur realm, id int, priceUgnot int64)

List puts plane id up for sale at priceUgnot. The caller must own it and have approved this realm on the planes realm (Approve for this plane, or SetApprovalForAll): the plane moves here, in escrow, until it is bought or the listing is cancelled.

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/g1t2kg2vtr3fukg43eujkn6x53gfdyakhngt4sfd/gnofly/nfts/market/bazaar/v0/gnofly" -func "List" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "https://rpc.gno.land" ADDRESSgnokey query -remote "https://rpc.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1t2kg2vtr3fukg43eujkn6x53gfdyakhngt4sfd/gnofly/nfts/market/bazaar/v0/gnofly" -func "List" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx