createToken

package
v1.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2020 License: GPL-3.0, GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

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 (*CreateTokenChainCode) Invoke

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

func (ct *CustomToken) ChangeOwner(caller common.Address, des common.Address) bool

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

func (ct *CustomToken) GetGlobalID(caller common.Address, innerID uint64) modules.AssetId

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

func (ct *CustomToken) GlobalIDByInnerID(caller common.Address, id uint64) modules.AssetId

GetUniversalToken(const):AnyOne

func (*CustomToken) IsOwner

func (ct *CustomToken) IsOwner(caller common.Address) bool

IsOwner(const):Anyone

func (*CustomToken) OwnerOf

func (ct *CustomToken) OwnerOf(caller common.Address, TokenID uint64) common.Address

OwnerOf(const):AnyOne

func (*CustomToken) Transfer

func (ct *CustomToken) Transfer(caller common.Address, to common.Address, ids []uint64) bool

transfer(danger):TokenHolder

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 {
}

type Token

type Token struct {
	InnerID     uint64
	GlobalID    modules.AssetId
	Holder      common.Address
	Creator     common.Address
	CreatedTime []byte
	Extra       []byte
}

Directories

Path Synopsis
* @author PalletOne core developer <dev@pallet.one> * @date 2018
* @author PalletOne core developer <dev@pallet.one> * @date 2018

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL