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/sys/cla

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
cla
Namespace
sys
Files
5 (gnomod.toml)
Exported functions
4
Module
gno.land/r/sys/cla
gno
0.9

Files (5)

  • gnomod.tomltoml
  • admin.gnogno
  • cla.gnogno
  • render.gnogno
  • cla_test.gnogno
cla.gnogno
1package cla23import (4	"chain"56	"gno.land/p/moul/addrset/v0"7)89const SignedEvent = "CLASigned"1011var (12	requiredHash string // SHA256 hash of the CLA document; empty = enforcement disabled13	claURL       string // URL where the CLA document can be found14	signatures   addrset.Set15)1617// Sign records a CLA signature for the caller.18// The hash must match the current required hash.19func Sign(cur realm, hash string) {20	if hash != requiredHash {21		panic("hash does not match required CLA hash")22	}2324	caller := cur.Previous().Address()25	signatures.Add(caller)2627	chain.Emit(28		SignedEvent,29		"signer", caller.String(),30		"hash", hash,31	)32}3334// HasValidSignature checks if an address has signed the current required CLA.35// Returns true if CLA enforcement is disabled (requiredHash == ""),36// or if the address has signed.37func HasValidSignature(addr address) bool {38	if requiredHash == "" {39		return true40	}41	return signatures.Has(addr)42}43

Functions

  • HasValidSignature(addr string) bool

  • ProposeNewCLA(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}, newHash string, newURL string) struct{title string; description string; executor gno.land/r/gov/dao.Executor; filter gno.land/r/gov/dao.Filter}

  • Render(path string) string

  • Sign(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}, hash 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.