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

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
v0
Namespace
sys / namereg
Files
17 (gnomod.toml)
Exported functions
11
Module
gno.land/r/sys/namereg/v0
gno
0.9

Files (17)

  • gnomod.tomltoml
  • admin.gnogno
  • api.gnogno
  • blacklist.gnogno
  • canonical.gnogno
  • errors.gnogno
  • init.gnogno
  • preregister.gnogno
  • render.gnogno
  • users.gnogno
  • blacklist_test.gnogno
  • canonical_test.gnogno
  • users_test.gnogno
  • z_0_prop1_filetest.gnogno
  • z_1_prop2_filetest.gnogno
  • z_2_prop3_filetest.gnogno
  • z_3_prop4_filetest.gnogno
  • z_3_prop4_filetest.gnogno
    1// PKGPATH: gno.land/r/sys/namereg/v0/filetests/z_3_prop4_filetest23package z_3_prop4_filetest45import (6	"chain"7	"chain/runtime/unsafe"8	"testing"910	"gno.land/r/gov/dao"11	daov3init "gno.land/r/gov/dao/init/v0"12	users "gno.land/r/sys/namereg/v0"13	susers "gno.land/r/sys/users"14)1516// Test the full governance-driven pause/unpause flow:17//  1. propose pause via NewSetPausedExecutor(true), vote YES, execute,18//     observe IsPaused() flip to true.19//  2. propose unpause via NewSetPausedExecutor(false), vote YES, execute,20//     observe IsPaused() flip back to false.21//  3. Register works again post-unpause.22var c address = unsafe.OriginCaller()2324func init(cur realm) {25	// Whitelist this realm as a controller so its Register() can reach r/sys/users.26	testing.SetHeight(0)27	susers.AddControllerAtGenesis(cross(cur), chain.PackageAddress("gno.land/r/sys/namereg/v0"))28	testing.SetHeight(123)2930	daov3init.InitWithUsers(cross(cur), c)31}3233func main(cur realm) {34	testing.SetOriginCaller(c)35	testing.SetRealm(testing.NewUserRealm(c))3637	println("paused before:", users.IsPaused())3839	// Propose, vote, execute: pause.40	dao.MustCreateProposal(cross(cur), users.NewSetPausedExecutor(cross(cur), true))41	dao.MustVoteOnProposal(cross(cur), dao.NewVoteRequest(dao.YesVote, dao.ProposalID(0)))42	dao.ExecuteProposal(cross(cur), dao.ProposalID(0))43	println("paused after pause prop:", users.IsPaused())4445	// Propose, vote, execute: unpause.46	dao.MustCreateProposal(cross(cur), users.NewSetPausedExecutor(cross(cur), false))47	dao.MustVoteOnProposal(cross(cur), dao.NewVoteRequest(dao.YesVote, dao.ProposalID(1)))48	dao.ExecuteProposal(cross(cur), dao.ProposalID(1))49	println("paused after unpause prop:", users.IsPaused())5051	// Register works again (the pause check inside Register would have52	// panicked with ErrPaused had the unpause executor not run).53	users.Register(cross(cur), "nym-alice123")54	data, _ := susers.ResolveName("nym-alice123")55	println("registered alice at:", data.Addr())56}5758// Output:59// paused before: false60// paused after pause prop: true61// paused after unpause prop: false62// registered alice at: g1wymu47drhr0kuq2098m792lytgtj2nyx77yrsm63

    Functions

    • Canonicalize(s string) string

    • IsPaused() bool

    • IsReserved(stem string) bool

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

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

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

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

    • Register(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}, username string)

    • Render(path string) string

    • RenderLatestUsersWidget(num int) string

    • ValidateNymFormat(username string) interface {Error func() 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.