Documentation ¶
Index ¶
- type CreateTokenChainCode
- type CustomToken
- func (ct *CustomToken) BalanceOf(caller common.Address) []uint64
- func (ct *CustomToken) ChangeOwner(caller common.Address, des common.Address) bool
- func (ct *CustomToken) ChangeTotalSupply(caller common.Address, amount uint64) bool
- func (ct *CustomToken) CreateNewToken(caller common.Address, additional []byte) bool
- func (ct *CustomToken) GetDecimals(caller common.Address) uint
- func (ct *CustomToken) GetGlobalID(caller common.Address, innerID uint64) modules.AssetId
- func (ct *CustomToken) GetName(caller common.Address) string
- func (ct *CustomToken) GetSymbol(caller common.Address) string
- func (ct *CustomToken) GetTotalSupply(caller common.Address) uint64
- func (ct *CustomToken) GlobalIDByInnerID(caller common.Address, id uint64) modules.AssetId
- func (ct *CustomToken) IsOwner(caller common.Address) bool
- func (ct *CustomToken) OwnerOf(caller common.Address, TokenID uint64) common.Address
- func (ct *CustomToken) Transfer(caller common.Address, to common.Address, ids []uint64) bool
- type CustomTokenConstructor
- type ICustomToken
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateTokenChainCode ¶
type CreateTokenChainCode struct { }
func (*CreateTokenChainCode) Init ¶
func (t *CreateTokenChainCode) Init(stub shim.ChaincodeStubInterface) pb.Response
func (*CreateTokenChainCode) Invoke ¶
func (t *CreateTokenChainCode) Invoke(stub shim.ChaincodeStubInterface) pb.Response
Invoke gets the supplied key and if it exists, updates the key with the newly supplied value.
type CustomToken ¶
type CustomToken struct { CustomTokenName string CustomTokenSymbol string TotalSupply uint64 Owner common.Address CurrentIdx uint64 Members map[common.Address][]uint64 Inventory map[uint64]Token //optional field TransFee uint //expiryTimeStamp uint64 Decimals uint }
注意大小写
func (*CustomToken) BalanceOf ¶
func (ct *CustomToken) BalanceOf(caller common.Address) []uint64
balanceOf(const):AnyOne
func (*CustomToken) ChangeOwner ¶
ChangeOwner(danger):Owner
func (*CustomToken) ChangeTotalSupply ¶
func (ct *CustomToken) ChangeTotalSupply(caller common.Address, amount uint64) bool
ChangeTotalSupply(danger):Owner
func (*CustomToken) CreateNewToken ¶
func (ct *CustomToken) CreateNewToken(caller common.Address, additional []byte) bool
CreateNewToken(danger):Owner
func (*CustomToken) GetDecimals ¶
func (ct *CustomToken) GetDecimals(caller common.Address) uint
GetDecimals(const):AnyOne
func (*CustomToken) GetGlobalID ¶
GetUniversalToken(const):AnyOne
func (*CustomToken) GetName ¶
func (ct *CustomToken) GetName(caller common.Address) string
Name(const):AnyOne
func (*CustomToken) GetSymbol ¶
func (ct *CustomToken) GetSymbol(caller common.Address) string
Symbol(const):AnyOne
func (*CustomToken) GetTotalSupply ¶
func (ct *CustomToken) GetTotalSupply(caller common.Address) uint64
TotalSupply(const):AnyOne
func (*CustomToken) GlobalIDByInnerID ¶
GetUniversalToken(const):AnyOne
func (*CustomToken) IsOwner ¶
func (ct *CustomToken) IsOwner(caller common.Address) bool
IsOwner(const):Anyone
type CustomTokenConstructor ¶
type CustomTokenConstructor struct { }
move to storage modules
func (*CustomTokenConstructor) CreateCustomToken ¶
func (ctor *CustomTokenConstructor) CreateCustomToken(Name string, Symbol string, ownerAddress common.Address) (*CustomToken, error)
func (*CustomTokenConstructor) ValidCustomTokenSymbolUniqueness ¶
func (ctor *CustomTokenConstructor) ValidCustomTokenSymbolUniqueness(tokenSymbol string) bool
type ICustomToken ¶
type ICustomToken interface { }
Click to show internal directories.
Click to hide internal directories.