# 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:**

> 🧪 **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 -->
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.
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.