Documentation ¶
Index ¶
- func IsUsableAddress(addr []byte) bool
- type Token
- func (t Token) BalanceOf(ctx storage.Context, hodler []byte) interface{}
- func (t Token) CanTransfer(ctx storage.Context, from []byte, to []byte, amount int) int
- func (t Token) GetSupply(ctx storage.Context) interface{}
- func (t Token) Transfer(ctx storage.Context, from []byte, to []byte, amount int) 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 // Total tokens * multiplier TotalSupply int // Storage key for circulation value CirculationKey string }
Token holds all token info
func (Token) CanTransfer ¶
CanTransfer returns the amount it can transfer
Click to show internal directories.
Click to hide internal directories.