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_2_prop3_filetest.gnogno
    1// PKGPATH: gno.land/r/sys/namereg/v0/filetests/z_2_prop3_filetest23package z_2_prop3_filetest45import (6	"chain"7	"chain/runtime/unsafe"8	"testing"910	"gno.land/p/nt/testutils/v0"11	"gno.land/r/gov/dao"12	daov3init "gno.land/r/gov/dao/init/v0"13	users "gno.land/r/sys/namereg/v0"14	susers "gno.land/r/sys/users"15)1617// Test the full governance-driven registerPrice flow:18//  1. propose a new price via users.ProposeNewRegisterPrice19//  2. DAO accepts the proposal (vote YES, execute)20//  3. verify the executed callback updated registerPrice by exercising21//     Register with the new amount and watching it succeed (registration22//     under the old default of 0 ugnot would now panic with the new23//     price in the error message).24var c address = unsafe.OriginCaller()2526func init(cur realm) {27	// Whitelist this realm as a controller so its Register() can reach r/sys/users.28	testing.SetHeight(0)29	susers.AddControllerAtGenesis(cross(cur), chain.PackageAddress("gno.land/r/sys/namereg/v0"))30	testing.SetHeight(123)3132	daov3init.InitWithUsers(cross(cur), c)3334	// Propose raising the price from 0 to 20 GNOT.35	testing.SetOriginCaller(c)36	testing.SetRealm(testing.NewUserRealm(c))37	pr := users.ProposeNewRegisterPrice(cross(cur), 20_000_000)38	dao.MustCreateProposal(cross(cur), pr)39}4041func main(cur realm) {42	testing.SetOriginCaller(c)4344	// Vote and execute.45	dao.MustVoteOnProposal(cross(cur), dao.NewVoteRequest(dao.YesVote, dao.ProposalID(0)))46	dao.ExecuteProposal(cross(cur), dao.ProposalID(0))4748	// New price should be active. Register a user with the new amount;49	// registration with the old default (0 ugnot) would panic.50	alice := testutils.TestAddress("alice")51	testing.SetOriginCaller(alice)52	testing.SetRealm(testing.NewUserRealm(alice))53	testing.SetOriginSend(chain.Coins{{Denom: "ugnot", Amount: 20_000_000}})54	users.Register(cross(cur), "nym-alice123")5556	data, _ := susers.ResolveName("nym-alice123")57	println("registered alice at:", data.Addr())58}5960// Output:61// registered alice at: g1v9kxjcm9ta047h6lta047h6lta047h6lzd40gh62

    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.