Documentation
¶
Overview ¶
基于wasm包装层的简单NFT合约示例
Index ¶
- Constants
- func Burn(ctx core.Context, tokenId core.ObjectID) bool
- func GetNFTInfo(ctx core.Context) (string, string, uint64)
- func GetOwner(ctx core.Context) core.Address
- func InitializeNFT(ctx core.Context, name string, symbol string) core.ObjectID
- func Mint(ctx core.Context, to core.Address, tokenURI string) (uint64, bool)
- func OwnerOf(ctx core.Context, tokenId core.ObjectID) core.Address
- func TokenURI(ctx core.Context, tokenId core.ObjectID) string
- func Transfer(ctx core.Context, from core.Address, to core.Address, tokenId core.ObjectID) bool
Constants ¶
View Source
const ( // 默认Object中的字段 NFTNameKey = "name" // NFT名称 NFTSymbolKey = "symbol" // NFT符号 NFTTotalSupplyKey = "total_supply" // 总供应量 NFTTokenURIKey = "token_uri" // Token URI NFTTokenIDKey = "token_id" // Token ID NFTTokenOwnerKey = "owner" // Token所有者 )
常量定义 - 对象中的字段名
Variables ¶
This section is empty.
Functions ¶
func InitializeNFT ¶
初始化NFT合约
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.