Cosmic Bull

Realm on pearl-1

coindemo

gno.land/r/g1ut6uspuh73e02yauxpmyt8g3wwddaq8utagvm3/coindemo

realmapplicationvalue-handling

RenderedSourceCall builderState

curated

Minimal realm exercising coinio + feeledger end to end; the vehicle that validated the coinio receipt guards on chain.

Identity

Import pathgno.land/r/g1ut6uspuh73e02yauxpmyt8g3wwddaq8utagvm3/coindemo
Kindrealm (/r/)
Chainpearl-1
Namespaceg1ut6uspuh73e02yauxpmyt8g3wwddaq8utagvm3
Realm addressg1x7rljdk7avp765cf2uxes9v0ysktwwp7rz54zu derived, never confirmed against the realm

Provenance

chain-attested
Deployed at height583,613
Deploy transaction38aa65019a1a5dee3b3e8509498f7d9c52cdfa9b5fcca59bb4a05b5957c6908c look it up on the RPC
Deployerg1ut6uspuh73e02yauxpmyt8g3wwddaq8utagvm3
Gas used12,400,946
Storage14,486 bytes, deposit 1448600ugnot
Files on chaincoindemo.gno gnomod.toml
Deployed bytescoindemo.gno — 3,626 bytes
sha25621a9b1eec88ae59abe8d9ffa4a5fcdc8dbd835086e2f458048a265a09f1eeb1c

Do not take the hash above on trust. $download returns the bytes pearl-1 is actually running; this command fetches them and prints their digest, which should equal the one in the table:

curl -sS 'https://pearl.testnets.gno.land/r/g1ut6uspuh73e02yauxpmyt8g3wwddaq8utagvm3/coindemo$download&file=coindemo.gno' | shasum -a 256

Expected: 21a9b1eec88ae59abe8d9ffa4a5fcdc8dbd835086e2f458048a265a09f1eeb1c — 3,626 bytes. This was checked for all 21 packages while building this site's architecture record; every one matched. Use curl: pearl's edge answers Python's default user-agent with HTTP 403.

API

chain-derived 9 exported functions.

Every function below deep-links to gnoweb's call builder, which generates a ready-to-run gnokey maketx call for it:

BalanceOfClaimAllDepositHeldRenderSurplusSweepTransferOwnerUsersTotal

Overview

Realm coindemo is a deliberately minimal third consumer proving the extracted primitives compose: coinio handles every coin movement, feeledger handles every balance. It is an echo-vault: deposit GNOT, claim it back in full (no fees), owner sweeps out-of-band surplus.

Conservation: H == U + S (no fee pot, no app escrow), where U is the ledger's users total and S >= 0 is out-of-band surplus, recoverable only via the owner's Sweep which reserves U.

Imports

Constants and variables

Denom is the only asset this realm accepts.

const Denom = "ugnot"

Functions

BalanceOf

func BalanceOf(addr address) int64

BalanceOf returns addr's claimable balance.

ClaimAll

func ClaimAll(cur realm)

Crossing function. Callable from a transaction via MsgCall, and from another realm as ClaimAll(cross(cur), ...).

ClaimAll sends the caller's entire balance back. Fails if empty.

Deposit

func Deposit(cur realm)

Crossing function. Callable from a transaction via MsgCall, and from another realm as Deposit(cross(cur), ...).

Deposit credits the caller with the attached GNOT, in full.

Held

func Held() int64

Held returns the ugnot actually held at the realm address.

Render

func Render(_ string) string

Render shows totals and the conservation check.

Surplus

func Surplus() int64

Surplus returns Held() - UsersTotal().

Sweep

func Sweep(cur realm)

Crossing function. Callable from a transaction via MsgCall, and from another realm as Sweep(cross(cur), ...).

Sweep sends ugnot held above user liabilities to the owner. Owner only; user balances are reserved by construction.

TransferOwner

func TransferOwner(cur realm, next address)

Crossing function. Callable from a transaction via MsgCall, and from another realm as TransferOwner(cross(cur), ...).

TransferOwner hands the sweep role to next. Owner only; zero address rejected (audit Y3: without rotation, key loss permanently orphans surplus sweeping).

UsersTotal

func UsersTotal() int64

UsersTotal returns the sum of all claimable balances.


Doc text is reproduced as vm/qdoc returns it. The node markdown-escapes doc comments, so a bracket or angle bracket may carry a backslash the committed source does not have. The source itself is at source and in this repository.

Dependencies

chain-attested
Importschain, chain/runtime/unsafe, gno.land/p/g1ut6uspuh73e02yauxpmyt8g3wwddaq8utagvm3/coinio, gno.land/p/g1ut6uspuh73e02yauxpmyt8g3wwddaq8utagvm3/feeledger, strconv
First-party dependenciesgno.land/p/g1ut6uspuh73e02yauxpmyt8g3wwddaq8utagvm3/coinio, gno.land/p/g1ut6uspuh73e02yauxpmyt8g3wwddaq8utagvm3/feeledger
Used bynone

Known limitations

curated

The manifest records no limitation for this package. That is an absence of a recorded caveat, not a proof that none exists — the deployment record below is the fuller account, and it always carries its own "what was NOT verified live" section.

Source and records

Source filepearl/r/coindemo/coindemo.gno at commit 6a510c665a53 in the project repository (not public — the digest command above is the check that needs no repository)
Matches the deployed bytesyes — byte-identical
Recordscatalog/primitives.md#pre-pipeline-realms
pearl/DEPLOYMENT.md