⚠️ Experimental — generated with no human supervision. This realm was
produced automatically by an MCP-driven agent to exercise the gno MCP server
and tooling, and to generate test content for gno compilers, linters and
formatters. Not audited. Not for production. Full context & folder README:
r/moul/x/daily
A Gno port of the classic Solidity Dutch-auction pattern: list an item at a
high starting price that decays linearly, block by block, down to a floor.
The first buyer to call Buy gets it at whatever the price is at that exact
block — no bidding war, just a clock ticking against the seller. Payment is
real ugnot, escrowed by the chain with the transaction; overpayment is
refunded automatically and the settled price is forwarded straight to the
seller.
# list an item: 1000 ugnot down to a 100 ugnot floor over 100 blocks
List(cur, "vintage synth", 1000, 100, 100) -> "1"
# anyone can check the live price without paying anything
CurrentPrice("1") -> 1000, decaying toward 100 as blocks pass
# buy at the current price, sending >= CurrentPrice("1") ugnot with the tx;
# any excess is refunded in the same call
Buy(cur, "1") -> price actually paid
# the seller can pull a listing before anyone buys it
Cancel(cur, "1")
Render("") lists every auction with its live price, floor, start price,
and status.
Toolchain status
gno test . passes (7/7) against gnolang/gno master (master.3130+bf5b31eda)
with GNOROOT pointed at a full checkout — the local gno on PATH ships
without a bundled stdlib tree, so GNOROOT had to be set explicitly to
resolve chain, chain/banker, chain/runtime, and
gno.land/p/nt/avl/v0/testutils/v0. gno lint . is clean. Target chain is
sapphire (gno 0.9); code sticks to the documented chain/* stdlib family and
crossing-function (cur realm) convention used by the other realms in this
batch.
Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.
Dependency graph:
🧪 Highly experimental — potentially vibe-coded. Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: DISCLAIMER.
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.
Buy purchases auction id at its current price. The caller must send at least that many ugnot with the transaction; any excess is refunded immediately. Only a direct EOA transaction (MsgCall) may buy, so the payment envelope can't be spoofed via an ephemeral MsgRun realm. Returns the price actually paid. Crossing function.
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.