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

tokenfactory source realm

Functions 10

func BalanceOf

Action
1func BalanceOf(
2	symbol string,
3	owner address,
4) int64
source

BalanceOf returns the token balance of an address.

func Bank

Action
1func Bank(symbol string) *grc20.Token
source

Bank returns the GRC20 token instance.

func Burn

crossing Action
1func Burn(
2	cur realm,
3	symbol string,
4	from address,
5	amount int64,
6)
source

Burn allows the token owner to burn tokens.

func CreateToken

crossing Action
1func CreateToken(
2	cur realm,
3	name string,
4	symbol string,
5	decimals int,
6	initialSupply int64,
7) string
source

CreateToken creates a new GRC20 token.

initialSupply is expressed in the token's smallest unit.

Example: decimals = 6 initialSupply = 1000000000000 => 1,000,000 tokens.

A direct user call must attach exactly 40 GNOT.

func DropTokenOwnership

crossing Action
1func DropTokenOwnership(
2	cur realm,
3	symbol string,
4)
source

DropTokenOwnership permanently removes the administrator of the token.

func Mint

crossing Action
1func Mint(
2	cur realm,
3	symbol string,
4	to address,
5	amount int64,
6)
source

Mint allows the token owner to mint additional tokens.

func TokenID

Action
1func TokenID(symbol string) string
source

TokenID returns the unique GRC20 token ID.

func TransferTokenOwnership

crossing Action
1func TransferTokenOwnership(
2	cur realm,
3	symbol string,
4	newOwner address,
5)
source

TransferTokenOwnership transfers administration of a token to another address.

Imports 8

Source Files 2