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

dutchauction/v0 package

Overview

Package dutchauction ports the classic Solidity Dutch-auction pattern to gno.land: a seller lists an item at a high starting price that decays linearly, block by block, down to a floor price. The first buyer to call Buy pays whatever the price is at that moment — real ugnot, escrowed by the chain with the transaction and forwarded to the seller on settlement. Overpayment is refunded automatically. State-mutating functions are crossing functions (`cur realm`) per the gno 0.9 interrealm convention.

Function

List

func List(cur realm, item string, startPrice, floorPrice, durationBlocks int64) string

List creates a new Dutch auction for item, starting at startPrice ugnot and falling linearly to floorPrice over durationBlocks. Returns the new auction's ID. Crossing function.

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/moul/x/daily/dutchauction/v0" -func "List" -args $'' -args $'' -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/moul/x/daily/dutchauction/v0" -func "List" -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 "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx