Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

avatar package

Functions

ClearNotice

func ClearNotice(cur realm)
Ask AI Claude ChatGPT

ClearNotice removes the current notice.

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/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/avatar" -func "ClearNotice" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "https://rpc.gno.land" ADDRESSgnokey query -remote "https://rpc.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/avatar" -func "ClearNotice" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx
  

Markdown

func Markdown(addr address, size int, transparent bool) string
Ask AI Claude ChatGPT

Markdown returns the avatar of an address as a Markdown image, or an empty text if it has none:

Example
1![Settler #12](data:image/svg+xml;charset=utf-8,...)

The size and transparent are the same as in SVG.

Params

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/avatar.Markdown(,,)"

Result

Render

func Render(path string) string
Ask AI Claude ChatGPT

Render renders the realm.

By default renders what this realm is, how to use it, and some avatars.

Paths:

  • `svg/{address}`: The SVG of the Settler of an address.
  • `md/{address}`: The Markdown that Markdown returns for an address, rendered, with the same parameters.

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/avatar.Render()"

Result

SVG

func SVG(addr address, size int, transparent bool) string
Ask AI Claude ChatGPT

SVG returns the SVG document of the Settler of an address, or an empty text if it has none.

The size is the width and height in pixels of the square image, from 32 to 2048 (multiples of 32 keep every art pixel as a whole number of screen pixels). A size of 0 or less leaves out the width and the height, so that the image scales to its container. If transparent is true, the image has no background.

Params

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/avatar.SVG(,,)"

Result

SetNotice

func SetNotice(cur realm, alertType mdalert.Type, msg string)
Ask AI Claude ChatGPT

SetNotice posts a realm-wide message, shown at the top of the page.

Params

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/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/avatar" -func "SetNotice" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "https://rpc.gno.land" ADDRESSgnokey query -remote "https://rpc.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/avatar" -func "SetNotice" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx
  

TransferAdmin

func TransferAdmin(cur realm, newAdmin address)
Ask AI Claude ChatGPT

TransferAdmin makes another account the admin. Only the admin can call it.

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/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/avatar" -func "TransferAdmin" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "https://rpc.gno.land" ADDRESSgnokey query -remote "https://rpc.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/avatar" -func "TransferAdmin" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx
  

URI

func URI(addr address, size int, transparent bool) string
Ask AI Claude ChatGPT

URI returns the image of the Settler of an address as a "data:image/svg+xml;charset=utf-8," URI, that can be used as the source of an image or as the address of a Markdown image, or an empty text if it has none. The size and transparent are the same as in SVG.

Params

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/avatar.URI(,,)"

Result