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

README.md

3.08 Kb · 64 lines

Escrow

⚠️ 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 minimal 2-party escrow realm for gno.land (a port of the classic Solidity escrow idea, accounting only — no funds move). One party opens a deal against a counterparty with free-form terms; both parties confirm to settle it, and the creator can cancel any deal that is still open.

Realm path: gno.land/r/REPLACE_ADDR/escrow

Example calls

# Alice opens a deal with Bob; returns the new deal id (e.g. 0)
Create(g1bob..., "swap NFT for 100 GNOT")

# Each party confirms; when both have confirmed, the deal becomes "Settled"
Confirm(0)   # called by Alice
Confirm(0)   # called by Bob -> Settled

# The creator may cancel while the deal is still Open
Cancel(0)    # called by Alice

Read (Render)

  • / — table of all deals: id, parties, state, confirmations, terms.
  • /<id> — details for a single deal (e.g. /0).

What changed in v1

Identical behaviour to v0 apart from rendering, which now goes through p/moul/kit/ui instead of the local short, escapePipe helpers.

One address format. Eleven realms carried their own shortAddr with four different truncation rules, so the same account rendered differently depending on which realm you opened. ui.Addr is that decision made once: 8 leading characters, an ellipsis, 4 trailing, in backticks.

Real escaping. The local helper replaced a handful of markdown metacharacters. ui.Inline and ui.Cell delegate to p/nt/markdown/sanitize, which also strips bidi and zero-width characters and folds newlines, so user text cannot reorder or escape the line it sits on.

Visible change: addresses now render in monospace.

The rendering change means the output differs from v0, which under this repo's versioning rule is a compatibility change, hence a new version rather than an edit in place. v0 stays live and untouched.


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:

gno.land/r/moul/x/daily/escrow/v1 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.