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

gnomic package

Overview

Parametric GRC20 realm for gno.land.

All configuration (name, symbol, decimals, supply, metadata) lives in config.gno. This file holds only the logic, which is not meant to be edited.

The realm:

  • creates a GRC20 token through gno.land/p/nt/grc20/v0
  • registers it with gno.land/r/nt/grc20reg/v0 (required to be discoverable by GnoSwap, wallets and explorers)
  • mints the initial supply to the deploying address
  • exposes the GRC20 methods as top-level functions callable via MsgCall
  • enforces a hard ceiling (maxSupply) on minting
  • lets the owner give up minting forever (DropOwnership)

Function

Approve

func Approve(cur realm, spender address, amount int64)

Approve authorises spender to draw up to amount from the caller.

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/nym-thegnomic001/gnomic" -func "Approve" -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/nym-thegnomic001/gnomic" -func "Approve" -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