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

grc20test source realm

Package grc20test provides a test GRC20 token for IBC transfer testing.

Overview

Package grc20test provides a test GRC20 token for IBC transfer testing.

Constants 1

const Slug

1const Slug = "TEST"
source

Slug is the grc20reg registration slug (the third argument to grc20reg.Register). Slugs must be alphanumeric (enforced by grc20reg).

Variables 1

var Token, ledger, UserTeller

1var (
2	Token      *grc20.Token
3	ledger     *grc20.PrivateLedger
4	UserTeller grc20.Teller
5)
source

Token, ledger, and UserTeller are initialised in init(cur realm) because grc20.NewToken now requires a `realm` capability and there is no realm value available at package-level var init time.

Functions 5

func Approve

crossing Action
1func Approve(cur realm, owner, spender address, amount int64)
source

Approve sets an allowance for spender to spend owner's tokens. Uses PrivateLedger directly to allow explicit owner specification. WARNING: test-only, no caller authorization — do not use as a pattern for production.

func Mint

crossing Action
1func Mint(cur realm, to address, amount int64)
source

Mint tokens to the specified address. WARNING: test-only, no caller authorization — do not use as a pattern for production.

Imports 2

Source Files 2