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/home

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
home
Namespace
moul
Files
10 (README)(gnomod.toml)
Exported functions
7
Module
gno.land/r/moul/home
gno
0.9

Files (10)

  • README.mdmarkdown
  • gnomod.tomltoml
  • home.gnogno
  • reactions.gnogno
  • render.gnogno
  • scan.gnogno
  • home_test.gnogno
  • reactions_test.gnogno
  • render_example_test.gnogno
  • scan_test.gnogno
  • reactions.gnogno
    1package home23import (4	"gno.land/p/moul/dynreplacer/v0"5	"gno.land/r/moul/reactions/v0"6)78// This file is the one interactive thing on the page: a :reactions: placeholder9// that renders the reaction block from gno.land/r/moul/reactions, keyed on this10// realm's path.11//12// Nothing is stored here. The tallies live in the reactions realm, which is why13// this realm can be redeployed (and wiped, see the package doc) without losing14// anyone's reaction, and why adding this cost one placeholder rather than a15// state machine.16//17// The block renders its own txlinks, so a reader clicks an emoji here and lands18// on the reactions realm's $help form with the page prefilled. This realm has19// no write path of its own for it and does not want one: the point of the20// indirection is that the same block behaves identically on every page that21// embeds it.2223// reactionsPlaceholders are the reserved slugs this file answers for. Listed in24// reservedSlugs (home.gno) so a slot can never take one of these names and25// shadow the computed value.26var reactionsPlaceholders = []string{"reactions"}2728// registerReactionCallbacks adds the reaction placeholder to r.29//30// dynreplacer only invokes a callback whose placeholder actually occurs in the31// layout, so a layout that does not use :reactions: never calls into the32// reactions realm at all.33//34// RenderBlockFor is used rather than the zero-argument RenderBlock, for the35// same reason config.TopBlockFor is (see render.gno): the zero-argument form36// reads the caller off the stack, which would be correct here, but this realm37// already states its own path as a constant and passing it cannot be wrong.38func registerReactionCallbacks(r *dynreplacer.Replacer) {39	r.RegisterCallback(":reactions:", func() string {40		return reactions.RenderBlockFor(realmPath)41	})42}43

    Functions

    • Append(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}, slug string, body string)

    • Delete(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}, slug string)

    • Get(slug string) string

    • Manifest() string

    • Render(path string) string

    • Revision() int

    • Set(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}, slug string, body 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.