Documentation ¶
Index ¶
- func IsUsableAddress(addr []byte) bool
- type Token
- func (t Token) BalanceOf(ctx storage.Context, holder []byte) int
- func (t Token) CanTransfer(ctx storage.Context, from []byte, to []byte, amount int) int
- func (t Token) GetSupply(ctx storage.Context) int
- func (t Token) Mint(ctx storage.Context, to interop.Hash160) bool
- func (t Token) MintContinual(ctx storage.Context, to interop.Hash160, amount int) bool
- func (t Token) Transfer(ctx storage.Context, from, to interop.Hash160, amount int, data interface{}) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsUsableAddress ¶
IsUsableAddress checks if the sender is either the correct NEO address or SC address
Types ¶
type Token ¶
type Token struct { // Token name Name string // Ticker symbol Symbol string // Amount of decimals Decimals int // Token owner address Owner []byte // TotalSupply Key for supply value TotalSupply int // Storage key for circulation value CirculationKey string }
Token holds all token info
func (Token) CanTransfer ¶
CanTransfer returns the amount it can transfer
func (Token) MintContinual ¶
Mint supply of tokens
Click to show internal directories.
Click to hide internal directories.