Documentation ¶
Overview ¶
Package nft contains non-divisible non-fungible NEP11-compatible token implementation. This token can be minted with GAS transfer to contract address, it will hash some data (including data provided in transfer) and produce base58-encoded string that is your NFT. Since it's based on hashing and basically you own a hash it's HASHY.
Index ¶
- func BalanceOf(holder interop.Hash160) int
- func Decimals() int
- func Destroy()
- func OnNEP17Payment(from interop.Hash160, amount int, data interface{})
- func OwnerOf(token []byte) interop.Hash160
- func Symbol() string
- func TokensOf(holder interop.Hash160) iterator.Iterator
- func TotalSupply() int
- func Transfer(to interop.Hash160, token []byte) bool
- func Update(nef, manifest []byte)
- func Verify() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decimals ¶
func Decimals() int
Decimals returns token decimals, this NFT is non-divisible, so it's 0.
func OnNEP17Payment ¶
OnNEP17Payment mints tokens if at least 10 GAS is provided. You don't call this method directly, instead it's called by GAS contract when you transfer GAS from your address to the address of this NFT contract.
func TotalSupply ¶
func TotalSupply() int
TotalSupply is a contract method that returns the number of tokens minted.
func Transfer ¶
Transfer token from its owner to another user, notice that it only has two parameters because token owner can be deduced from token ID itself and RC1 implementation doesn't yet have 'data' parameter as in NEP-17 Transfer.
Types ¶
This section is empty.