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/reactions/v0

Realm
Open in gnoweb ↗

Overview

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

Files (5)

  • README.mdmarkdown
  • gnomod.tomltoml
  • reactions.gnogno
  • render.gnogno
  • reactions_test.gnogno

Select a file to view its exact on-chain source. Sorted README → gnomod → sources → tests.

Functions

  • Count(page string) int

  • CountOf(page string, key string) int

  • Last(page string) (key string, who string, height int64)

  • Pages() int

  • React(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}, page string, key string)

  • ReactionOf(page string, who string) string

  • Render(path string) string

  • RenderBlock() string

  • RenderBlockFor(page string) string

  • Unreact(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}, page string)

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

Rendered

RenderedRawgnoweb ↗
# Reactions

A reaction block any realm can embed. One line in your `Render`, no state on your side, and readers get one-click reactions keyed on the page they are looking at.

It is not a comment system, on purpose. There is no text field anywhere, which is what lets it run with no moderation: a closed palette, one reaction per address per page, changeable and removable.

## It looks like this

[👍](/r/moul/reactions/v0$help&func=React&key=up&page=gno.land%2Fr%2Fmoul%2Freactions%2Fv0) [💜](/r/moul/reactions/v0$help&func=React&key=heart&page=gno.land%2Fr%2Fmoul%2Freactions%2Fv0) [🔥](/r/moul/reactions/v0$help&func=React&key=fire&page=gno.land%2Fr%2Fmoul%2Freactions%2Fv0) [🎉](/r/moul/reactions/v0$help&func=React&key=party&page=gno.land%2Fr%2Fmoul%2Freactions%2Fv0) [🚀 1](/r/moul/reactions/v0$help&func=React&key=rocket&page=gno.land%2Fr%2Fmoul%2Freactions%2Fv0) [👀](/r/moul/reactions/v0$help&func=React&key=eyes&page=gno.land%2Fr%2Fmoul%2Freactions%2Fv0)

*last 🚀 by `g1manfre…dlf5` · [1 reaction](/r/moul/reactions/v0:gno.land/r/moul/reactions/v0)*

That block is live and it is this realm's own page. Click one.

## Add it to your realm

```go
import "gno.land/r/moul/reactions/v0"

func Render(path string) string {
	return body + reactions.RenderBlock()
}
```

That is the whole integration. `RenderBlock` takes no argument because it does not need one: a plain read exported by one realm and called by another opens no realm frame, so it sees YOUR path and uses it as the page key. Nothing to register, nothing to configure.

For one block per article rather than one per realm, name the page yourself with the path you already serve:

```go
return body + reactions.RenderBlockFor("gno.land/r/you/blog:" + path)
```

Reactions are recorded here, not in your realm, so redeploying yours never loses them.

## The palette

| key |  |
| --- | --- |
| `up` | 👍 |
| `heart` | 💜 |
| `fire` | 🔥 |
| `party` | 🎉 |
| `rocket` | 🚀 |
| `eyes` | 👀 |

Six, and the set is closed. `React` aborts on anything else, which is the entire moderation policy.

## The board

| page | reactions | last |
| --- | --- | --- |
| [gno\.land/r/moul/home](/r/moul/reactions/v0:gno.land/r/moul/home) | 1 | 🚀 `g1manfre…dlf5` |
| [gno\.land/r/moul/reactions/v0](/r/moul/reactions/v0:gno.land/r/moul/reactions/v0) | 1 | 🚀 `g1manfre…dlf5` |

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.