foo20 package

Overview

foo20 is a GRC20 token contract where all the grc20.Teller methods are proxified with top-level functions. see also gno.land/r/demo/bar20.

Functions

Allowance

func Allowance(owner, spender std.Address) uint64

Params

Command

gnokey query -remote "https://rpc.gno.land:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/demo/foo20" -func "Allowance"  -args "" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "portal-loop" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land:443" call.tx

Approve

func Approve(spender std.Address, amount uint64)

Params

Command

gnokey query -remote "https://rpc.gno.land:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/demo/foo20" -func "Approve"  -args "" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "portal-loop" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land:443" call.tx

BalanceOf

func BalanceOf(owner std.Address) uint64

Param

Command

gnokey query -remote "https://rpc.gno.land:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/demo/foo20" -func "BalanceOf"  -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "portal-loop" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land:443" call.tx

Burn

func Burn(from std.Address, amount uint64)

Params

Command

gnokey query -remote "https://rpc.gno.land:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/demo/foo20" -func "Burn"  -args "" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "portal-loop" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land:443" call.tx

Faucet

func Faucet()

Faucet is distributing foo20 tokens without restriction (unsafe). For a real token faucet, you should take care of setting limits are asking payment.

Command

gnokey query -remote "https://rpc.gno.land:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/demo/foo20" -func "Faucet"  -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "portal-loop" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land:443" call.tx

Mint

func Mint(to std.Address, amount uint64)

Params

Command

gnokey query -remote "https://rpc.gno.land:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/demo/foo20" -func "Mint"  -args "" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "portal-loop" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land:443" call.tx

Render

func Render(path string) string

Param

Command

gnokey query -remote "https://rpc.gno.land:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/demo/foo20" -func "Render"  -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "portal-loop" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land:443" call.tx

TotalSupply

func TotalSupply() uint64

Command

gnokey query -remote "https://rpc.gno.land:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/demo/foo20" -func "TotalSupply"  -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "portal-loop" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land:443" call.tx

Transfer

func Transfer(to std.Address, amount uint64)

Params

Command

gnokey query -remote "https://rpc.gno.land:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/demo/foo20" -func "Transfer"  -args "" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "portal-loop" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land:443" call.tx

TransferFrom

func TransferFrom(from, to std.Address, amount uint64)

Params

Command

gnokey query -remote "https://rpc.gno.land:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/demo/foo20" -func "TransferFrom"  -args "" -args "" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "portal-loop" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land:443" call.tx