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
admin.gnogno
1package cla23import (4	"chain"56	"gno.land/p/moul/addrset/v0"7	"gno.land/p/moul/helplink/v0"8	"gno.land/r/gov/dao"9)1011const RequiredHashChangedEvent = "CLARequiredHashChanged"1213// ProposeNewCLA creates a govdao proposal to update the CLA document hash and URL.14// When executed, it resets all existing signatures.15// Propose an empty hash to disable CLA enforcement.16func ProposeNewCLA(cur realm, newHash, newURL string) dao.ProposalRequest {17	cb := func(cur realm) error {18		setRequiredHash(newHash)19		claURL = newURL20		return nil21	}2223	desc := "Propose updating the CLA requirement.\n\n"24	if requiredHash != "" {25		desc += "Current hash: " + requiredHash + "\n"26	}27	if claURL != "" {28		desc += "Current URL: " + claURL + "\n"29	}30	if newHash != "" {31		desc += "New hash: " + newHash + "\n"32	}33	if newURL != "" {34		desc += "New URL: " + newURL + "\n"35	}36	if newHash == "" {37		desc += "This proposal disables CLA enforcement.\n"38	}3940	return dao.NewProposalRequest(41		"Update CLA requirement",42		desc,43		dao.NewSimpleExecutor(0, cur, cb, helplink.Realm("gno.land/r/sys/cla").Home()),44	)45}4647func setRequiredHash(newHash string) {48	prevHash := requiredHash49	requiredHash = newHash50	signatures = addrset.Set{} // reset all signatures5152	chain.Emit(53		RequiredHashChangedEvent,54		"from", prevHash,55		"to", newHash,56	)57}58

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.