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.

coins package

Functions

BalanceOf

func BalanceOf(coinId string, addr string) string
Ask AI Claude ChatGPT

BalanceOf returns the token balance of addr for coinId.

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g138gdmwj6heduu3st796lw6qqdwylgaxf7ty5gz/coins.BalanceOf(,)"

Result

BalancesOf

func BalancesOf(addr string) string
Ask AI Claude ChatGPT

BalancesOf returns all coin balances for a given address as a JSON object.

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g138gdmwj6heduu3st796lw6qqdwylgaxf7ty5gz/coins.BalancesOf()"

Result

Burn

func Burn(cur realm, coinId string, fromAddr string, amountStr string)
Ask AI Claude ChatGPT

Burn destroys tokens of coinId from fromAddr. Only the minter or admin can burn.

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

Mint

func Mint(cur realm, coinId string, toAddr string, amountStr string)
Ask AI Claude ChatGPT

Mint creates new tokens of coinId and credits them to toAddr. Only the authorized minter or admin can call this.

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

MinterAddr

func MinterAddr() string
Ask AI Claude ChatGPT

MinterAddr returns the current authorized minter address.

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g138gdmwj6heduu3st796lw6qqdwylgaxf7ty5gz/coins.MinterAddr()"

Result

Render

func Render(_ string) string
Ask AI Claude ChatGPT

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g138gdmwj6heduu3st796lw6qqdwylgaxf7ty5gz/coins.Render()"

Result

SetMinter

func SetMinter(cur realm, newMinter string)
Ask AI Claude ChatGPT

SetMinter sets the authorized minter address. Called once after the minter realm is deployed, by the admin.

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

TotalSupply

func TotalSupply(coinId string) string
Ask AI Claude ChatGPT

TotalSupply returns the total minted supply for coinId.

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g138gdmwj6heduu3st796lw6qqdwylgaxf7ty5gz/coins.TotalSupply()"

Result

Transfer

func Transfer(cur realm, coinId string, toAddr string, amountStr string)
Ask AI Claude ChatGPT

Transfer moves tokens from the caller to toAddr. Any holder can call this.

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