Search Apps Documentation Source Content File Folder Download Copy Actions Download

names package

Overview

Package names enforces namespace permissions for package deployment. Only address-prefix (PA) namespaces are allowed.

Functions

Enable

func Enable(cur realm)

Enable enables the namespace check and drops centralized ownership of this realm. The namespace check is disabled initially to ease txtar and other testing contexts, but this function is meant to be called in the genesis of a chain.

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/sys/names" -func "Enable" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast -chainid "gnoland1" -remote "http://rpc.betanet.testnets.gno.land" ADDRESSgnokey query -remote "http://rpc.betanet.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/sys/names" -func "Enable" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "http://rpc.betanet.testnets.gno.land" call.tx
  

IsAuthorizedAddressForNamespace

func IsAuthorizedAddressForNamespace(address_XXX address, namespace string) bool

IsAuthorizedAddressForNamespace checks if the given address can deploy to the given namespace. Only the address's own PA namespace is permitted.

Params

Command

gnokey query vm/qeval -remote "http://rpc.betanet.testnets.gno.land" -data "gno.land/r/sys/names.IsAuthorizedAddressForNamespace(,)"

Result

IsEnabled

func IsEnabled() bool

Command

gnokey query vm/qeval -remote "http://rpc.betanet.testnets.gno.land" -data "gno.land/r/sys/names.IsEnabled()"

Result

Render

func Render(_ string) string

Param

Command

gnokey query vm/qeval -remote "http://rpc.betanet.testnets.gno.land" -data "gno.land/r/sys/names.Render()"

Result