Search Apps Documentation Source Content File Folder Download Copy Actions Download

config package

Functions

AddAdmin

func AddAdmin(cur realm, addr address)

AddAdmin adds an admin to the Admin Group.

Param

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/n2p5/config" -func "AddAdmin" -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "test11" -remote "https://rpc.test11.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test11.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/n2p5/config" -func "AddAdmin" -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test11" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test11.testnets.gno.land" call.tx
  

AddBackupOwner

func AddBackupOwner(cur realm, addr address)

AddBackupOwner adds a backup owner to the Owner Group. A backup owner can claim ownership of the contract.

Param

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/n2p5/config" -func "AddBackupOwner" -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "test11" -remote "https://rpc.test11.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test11.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/n2p5/config" -func "AddBackupOwner" -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test11" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test11.testnets.gno.land" call.tx
  

Admins

func Admins() []string

Admins returns the current admin members of the claims contract.

Command

gnokey query vm/qeval -remote "https://rpc.test11.testnets.gno.land" -data "gno.land/r/n2p5/config.Admins()"

Result

BackupOwners

func BackupOwners() []string

BackupOwners returns the current backup owners of the claims contract.

Command

gnokey query vm/qeval -remote "https://rpc.test11.testnets.gno.land" -data "gno.land/r/n2p5/config.BackupOwners()"

Result

ClaimOwnership

func ClaimOwnership(cur realm)

ClaimOwnership allows an authorized user in the ownerGroup to claim ownership of the contract.

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/n2p5/config" -func "ClaimOwnership" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "test11" -remote "https://rpc.test11.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test11.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/n2p5/config" -func "ClaimOwnership" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test11" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test11.testnets.gno.land" call.tx
  

IsAdmin

func IsAdmin(addr address) bool

IsAdmin checks if an address is in the config adminGroup.

Param

Command

gnokey query vm/qeval -remote "https://rpc.test11.testnets.gno.land" -data "gno.land/r/n2p5/config.IsAdmin()"

Result

RemoveAdmin

func RemoveAdmin(cur realm, addr address)

RemoveAdmin removes an admin from the Admin Group. The primary owner cannot be removed.

Param

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/n2p5/config" -func "RemoveAdmin" -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "test11" -remote "https://rpc.test11.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test11.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/n2p5/config" -func "RemoveAdmin" -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test11" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test11.testnets.gno.land" call.tx
  

RemoveBackupOwner

func RemoveBackupOwner(cur realm, addr address)

RemoveBackupOwner removes a backup owner from the Owner Group. The primary owner cannot be removed.

Param

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/n2p5/config" -func "RemoveBackupOwner" -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "test11" -remote "https://rpc.test11.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test11.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/n2p5/config" -func "RemoveBackupOwner" -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test11" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test11.testnets.gno.land" call.tx
  

Render

func Render(path string) string

Param

Command

gnokey query vm/qeval -remote "https://rpc.test11.testnets.gno.land" -data "gno.land/r/n2p5/config.Render()"

Result