Documentation
¶
Overview ¶
基于wasm包装层的简单令牌合约示例
Index ¶
- Constants
- func BalanceOf(ctx core.Context, owner core.Address) uint64
- func Burn(ctx core.Context, amount uint64) bool
- func GetOwner(ctx core.Context) core.Address
- func GetTokenInfo(ctx core.Context) (string, string, uint8, uint64)
- func InitializeToken(ctx core.Context, name string, symbol string, decimals uint8, ...) core.ObjectID
- func Mint(ctx core.Context, to core.Address, amount uint64) bool
- func Transfer(ctx core.Context, to core.Address, amount uint64) bool
Constants ¶
View Source
const ( // 默认Object中的字段 TokenNameKey = "name" // 令牌名称 TokenSymbolKey = "symbol" // 令牌符号 TokenDecimalsKey = "decimals" // 令牌小数位 TokenTotalSupplyKey = "total_supply" // 总供应量 TokenBalancePrefix = "balance_" // 余额字段前缀 TokenOwnerKey = "owner" // 令牌所有者 )
常量定义 - 对象中的字段名
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.