PathrockNetwork Gno Explorer
HomeBlocksTransactionsTokensRealmsPackagesValidatorsAnalytics

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

gno.land/r/moul/x/daily/streak/v0

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
v0
Namespace
moul / x / daily / streak
Files
3 (README)(gnomod.toml)
Exported functions
5
Module
gno.land/r/moul/x/daily/streak/v0
gno
0.9

Files (3)

  • README.mdmarkdown
  • gnomod.tomltoml
  • streak.gnogno
README.mdPreviewRaw
# Check-in Streaks

> ⚠️ **Experimental — generated with no human supervision** by the daily MCP pipeline to exercise gno tooling. Not audited. See [r/moul/x/daily](https://github.com/moul/gno-contracts/blob/main/r/moul/x/daily/README.md).

---

Call `CheckIn()` once per "day" to keep a streak alive. Miss one and the current
streak resets to 1 — but your **best** streak is never lowered, so a broken run
costs the run, not the record.

There is no wall clock on-chain, so a "day" is a fixed window of `BlocksPerDay`
(1000) blocks: `day = ChainHeight() / BlocksPerDay`. Every streak decision is
therefore a pure function of block height — deterministic, replayable, and
impossible to game by waiting for a favourable timestamp.

```
CheckIn()                        → extends or restarts your streak, returns it
Current(addr)                    → live streak (0 once the window has lapsed)
Best(addr)                       → record streak, never lowered
Day()                            → current day index

/r/moul/x/daily/streak/v0        → leaderboard, ranked by best streak
/r/moul/x/daily/streak/v0:g1...  → one address's standing
```

`Current` deliberately reports the *live* truth rather than the stored value:
once a window lapses it returns 0 even though the record still holds the old
number until the next check-in rewrites it.

Checking in twice in the same window is rejected — the streak only moves when
the window does. Only an EOA can check in (`IsUserCall`), so another realm
can't farm streaks on your behalf.

Built for gno 0.9. Live on both testnets (agent address):

- sapphire — https://sapphire.testnets.gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/streak
- pearl — https://pearl.testnets.gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/streak

<!-- BEGIN GNOCONTRACTS FOOTER (generated by `make readmes`; do not edit below) -->

---

Part of **[moul/gno-contracts](https://github.com/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/streak/v0 dependency graph](https://raw.githubusercontent.com/moul/gno-contracts/main/_assets/gno.land/r/moul/x/daily/streak/v0/deps.png)

> 🧪 **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](https://github.com/moul/gno-contracts/blob/main/DISCLAIMER.md).

<!-- END GNOCONTRACTS FOOTER -->

Functions

  • Best(addr string) int

  • CheckIn(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}) int

  • Current(addr string) int

  • Day() int64

  • Render(path string) string

Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.

Rendered

RenderedRawgnoweb ↗

vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.