types

package
Version: v1.67.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: BSD-3-Clause Imports: 12 Imported by: 16

Documentation

Index

Constants

View Source
const (
	// ActionTransfer for transfer
	ActionTransfer = 4
	// ActionGenesis for genesis
	ActionGenesis = 5
	// ActionWithdraw for Withdraw
	ActionWithdraw = 6
	// TokenActionPreCreate for token pre create
	TokenActionPreCreate = 7
	// TokenActionFinishCreate for token finish create
	TokenActionFinishCreate = 8
	// TokenActionRevokeCreate for token revoke create
	TokenActionRevokeCreate = 9
	// TokenActionTransferToExec for token transfer to exec
	TokenActionTransferToExec = 11
	// TokenActionMint for token mint
	TokenActionMint = 12
	// TokenActionBurn for token burn
	TokenActionBurn = 13
)
View Source
const (
	// TokenStatusPreCreated token pre create status
	TokenStatusPreCreated = iota
	// TokenStatusCreated token create status
	TokenStatusCreated
	// TokenStatusCreateRevoked token revoke status
	TokenStatusCreateRevoked
)

token status

View Source
const (
	// TyLogPreCreateToken log for pre create token
	TyLogPreCreateToken = 211
	// TyLogFinishCreateToken log for finish create token
	TyLogFinishCreateToken = 212
	// TyLogRevokeCreateToken log for revoke create token
	TyLogRevokeCreateToken = 213
	// TyLogTokenTransfer log for token tranfer
	TyLogTokenTransfer = 313
	// TyLogTokenGenesis log for token genesis
	TyLogTokenGenesis = 314
	// TyLogTokenDeposit log for token deposit
	TyLogTokenDeposit = 315
	// TyLogTokenExecTransfer log for token exec transfer
	TyLogTokenExecTransfer = 316
	// TyLogTokenExecWithdraw log for token exec withdraw
	TyLogTokenExecWithdraw = 317
	// TyLogTokenExecDeposit log for token exec deposit
	TyLogTokenExecDeposit = 318
	// TyLogTokenExecFrozen log for token exec frozen
	TyLogTokenExecFrozen = 319
	// TyLogTokenExecActive log for token exec active
	TyLogTokenExecActive = 320
	// TyLogTokenGenesisTransfer log for token genesis rransfer
	TyLogTokenGenesisTransfer = 321
	// TyLogTokenGenesisDeposit log for token genesis deposit
	TyLogTokenGenesisDeposit = 322
	// TyLogTokenMint log for token mint
	TyLogTokenMint = 323
	// TyLogTokenBurn log for token burn
	TyLogTokenBurn = 324
)
View Source
const (
	// TokenNameLenLimit token name length limit
	TokenNameLenLimit = 128
	// TokenSymbolLenLimit token symbol length limit
	TokenSymbolLenLimit = 16
	// TokenIntroLenLimit token introduction length limit
	TokenIntroLenLimit = 1024
)
View Source
const (
	// CategoryMintBurnSupport support mint & burn
	CategoryMintBurnSupport = 1 << iota
)

Variables

View Source
var (
	// TokenX token name
	TokenX = "token"

	// ForkTokenBlackListX fork const
	ForkTokenBlackListX = "ForkTokenBlackList"
	// ForkBadTokenSymbolX fork const
	ForkBadTokenSymbolX = "ForkBadTokenSymbol"
	// ForkTokenPriceX fork const
	ForkTokenPriceX = "ForkTokenPrice"
	// ForkTokenSymbolWithNumberX fork const
	ForkTokenSymbolWithNumberX = "ForkTokenSymbolWithNumber"
	// ForkTokenCheckX  fork check impl bug
	ForkTokenCheckX = "ForkTokenCheck"
)
View Source
var (
	// ErrTokenNameLen error token name length
	ErrTokenNameLen = errors.New("ErrTokenNameLength")
	// ErrTokenSymbolLen error token symbol length
	ErrTokenSymbolLen = errors.New("ErrTokenSymbolLength")
	// ErrTokenTotalOverflow error token total Overflow
	ErrTokenTotalOverflow = errors.New("ErrTokenTotalOverflow")
	// ErrTokenSymbolUpper error token total Overflow
	ErrTokenSymbolUpper = errors.New("ErrTokenSymbolUpper")
	// ErrTokenIntroLen error token introduction length
	ErrTokenIntroLen = errors.New("ErrTokenIntroductionLen")
	// ErrTokenExist error token symbol exist already
	ErrTokenExist = errors.New("ErrTokenSymbolExistAlready")
	// ErrTokenNotPrecreated error token not pre created
	ErrTokenNotPrecreated = errors.New("ErrTokenNotPrecreated")
	// ErrTokenCreatedApprover error token created approver
	ErrTokenCreatedApprover = errors.New("ErrTokenCreatedApprover")
	// ErrTokenRevoker error token revoker
	ErrTokenRevoker = errors.New("ErrTokenRevoker")
	// ErrTokenCanotRevoked error token canot revoked with wrong status
	ErrTokenCanotRevoked = errors.New("ErrTokenCanotRevokedWithWrongStatus")
	// ErrTokenOwner error token symbol owner not match
	ErrTokenOwner = errors.New("ErrTokenSymbolOwnerNotMatch")
	// ErrTokenHavePrecreated error owner have token pre create yet
	ErrTokenHavePrecreated = errors.New("ErrOwnerHaveTokenPrecreateYet")
	// ErrTokenBlacklist error token blacklist
	ErrTokenBlacklist = errors.New("ErrTokenBlacklist")
	// ErrTokenNotExist error token symbol not exist
	ErrTokenNotExist = errors.New("ErrTokenSymbolNotExist")
	// ErrTokenBlacklistNotInit error token hasn't init blacklist
	ErrTokenBlacklistNotInit = errors.New("ErrTokenBlacklistNotInit")
)
View Source
var File_token_proto protoreflect.FileDescriptor

Functions

func InitExecutor

func InitExecutor(cfg *types.Chain33Config)

InitExecutor ...

func InitFork

func InitFork(cfg *types.Chain33Config)

InitFork ...

func RegisterTokenServer

func RegisterTokenServer(s *grpc.Server, srv TokenServer)

Types

type LocalLogs

type LocalLogs struct {
	Symbol     string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	TxIndex    string `protobuf:"bytes,2,opt,name=txIndex,proto3" json:"txIndex,omitempty"`
	ActionType int32  `protobuf:"varint,3,opt,name=actionType,proto3" json:"actionType,omitempty"`
	TxHash     string `protobuf:"bytes,4,opt,name=txHash,proto3" json:"txHash,omitempty"`
	// contains filtered or unexported fields
}

func (*LocalLogs) Descriptor deprecated

func (*LocalLogs) Descriptor() ([]byte, []int)

Deprecated: Use LocalLogs.ProtoReflect.Descriptor instead.

func (*LocalLogs) GetActionType

func (x *LocalLogs) GetActionType() int32

func (*LocalLogs) GetSymbol

func (x *LocalLogs) GetSymbol() string

func (*LocalLogs) GetTxHash

func (x *LocalLogs) GetTxHash() string

func (*LocalLogs) GetTxIndex

func (x *LocalLogs) GetTxIndex() string

func (*LocalLogs) ProtoMessage

func (*LocalLogs) ProtoMessage()

func (*LocalLogs) ProtoReflect added in v1.65.3

func (x *LocalLogs) ProtoReflect() protoreflect.Message

func (*LocalLogs) Reset

func (x *LocalLogs) Reset()

func (*LocalLogs) String

func (x *LocalLogs) String() string

type LocalToken

type LocalToken struct {
	Name                string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Symbol              string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Introduction        string `protobuf:"bytes,3,opt,name=introduction,proto3" json:"introduction,omitempty"`
	Total               int64  `protobuf:"varint,4,opt,name=total,proto3" json:"total,omitempty"`
	Price               int64  `protobuf:"varint,5,opt,name=price,proto3" json:"price,omitempty"`
	Owner               string `protobuf:"bytes,6,opt,name=owner,proto3" json:"owner,omitempty"`
	Creator             string `protobuf:"bytes,7,opt,name=creator,proto3" json:"creator,omitempty"`
	Status              int32  `protobuf:"varint,8,opt,name=status,proto3" json:"status,omitempty"`
	CreatedHeight       int64  `protobuf:"varint,9,opt,name=createdHeight,proto3" json:"createdHeight,omitempty"`
	CreatedTime         int64  `protobuf:"varint,10,opt,name=createdTime,proto3" json:"createdTime,omitempty"`
	PrepareCreateHeight int64  `protobuf:"varint,11,opt,name=prepareCreateHeight,proto3" json:"prepareCreateHeight,omitempty"`
	PrepareCreateTime   int64  `protobuf:"varint,12,opt,name=prepareCreateTime,proto3" json:"prepareCreateTime,omitempty"`
	Precision           int32  `protobuf:"varint,13,opt,name=precision,proto3" json:"precision,omitempty"`
	// 如果需要这个项可以单独做一个域存储
	TotalTransferTimes int64 `protobuf:"varint,14,opt,name=totalTransferTimes,proto3" json:"totalTransferTimes,omitempty"`
	RevokedHeight      int64 `protobuf:"varint,15,opt,name=revokedHeight,proto3" json:"revokedHeight,omitempty"`
	RevokedTime        int64 `protobuf:"varint,16,opt,name=revokedTime,proto3" json:"revokedTime,omitempty"`
	Category           int32 `protobuf:"varint,17,opt,name=category,proto3" json:"category,omitempty"`
	// contains filtered or unexported fields
}

local

func (*LocalToken) Descriptor deprecated

func (*LocalToken) Descriptor() ([]byte, []int)

Deprecated: Use LocalToken.ProtoReflect.Descriptor instead.

func (*LocalToken) GetCategory

func (x *LocalToken) GetCategory() int32

func (*LocalToken) GetCreatedHeight

func (x *LocalToken) GetCreatedHeight() int64

func (*LocalToken) GetCreatedTime

func (x *LocalToken) GetCreatedTime() int64

func (*LocalToken) GetCreator

func (x *LocalToken) GetCreator() string

func (*LocalToken) GetIntroduction

func (x *LocalToken) GetIntroduction() string

func (*LocalToken) GetName

func (x *LocalToken) GetName() string

func (*LocalToken) GetOwner

func (x *LocalToken) GetOwner() string

func (*LocalToken) GetPrecision

func (x *LocalToken) GetPrecision() int32

func (*LocalToken) GetPrepareCreateHeight

func (x *LocalToken) GetPrepareCreateHeight() int64

func (*LocalToken) GetPrepareCreateTime

func (x *LocalToken) GetPrepareCreateTime() int64

func (*LocalToken) GetPrice

func (x *LocalToken) GetPrice() int64

func (*LocalToken) GetRevokedHeight

func (x *LocalToken) GetRevokedHeight() int64

func (*LocalToken) GetRevokedTime

func (x *LocalToken) GetRevokedTime() int64

func (*LocalToken) GetStatus

func (x *LocalToken) GetStatus() int32

func (*LocalToken) GetSymbol

func (x *LocalToken) GetSymbol() string

func (*LocalToken) GetTotal

func (x *LocalToken) GetTotal() int64

func (*LocalToken) GetTotalTransferTimes

func (x *LocalToken) GetTotalTransferTimes() int64

func (*LocalToken) ProtoMessage

func (*LocalToken) ProtoMessage()

func (*LocalToken) ProtoReflect added in v1.65.3

func (x *LocalToken) ProtoReflect() protoreflect.Message

func (*LocalToken) Reset

func (x *LocalToken) Reset()

func (*LocalToken) String

func (x *LocalToken) String() string

type ReceiptToken

type ReceiptToken struct {
	Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Owner  string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
	Status int32  `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

log

func (*ReceiptToken) Descriptor deprecated

func (*ReceiptToken) Descriptor() ([]byte, []int)

Deprecated: Use ReceiptToken.ProtoReflect.Descriptor instead.

func (*ReceiptToken) GetOwner

func (x *ReceiptToken) GetOwner() string

func (*ReceiptToken) GetStatus

func (x *ReceiptToken) GetStatus() int32

func (*ReceiptToken) GetSymbol

func (x *ReceiptToken) GetSymbol() string

func (*ReceiptToken) ProtoMessage

func (*ReceiptToken) ProtoMessage()

func (*ReceiptToken) ProtoReflect added in v1.65.3

func (x *ReceiptToken) ProtoReflect() protoreflect.Message

func (*ReceiptToken) Reset

func (x *ReceiptToken) Reset()

func (*ReceiptToken) String

func (x *ReceiptToken) String() string

type ReceiptTokenAmount

type ReceiptTokenAmount struct {
	Prev    *Token `protobuf:"bytes,1,opt,name=prev,proto3" json:"prev,omitempty"`
	Current *Token `protobuf:"bytes,2,opt,name=current,proto3" json:"current,omitempty"`
	// contains filtered or unexported fields
}

func (*ReceiptTokenAmount) Descriptor deprecated

func (*ReceiptTokenAmount) Descriptor() ([]byte, []int)

Deprecated: Use ReceiptTokenAmount.ProtoReflect.Descriptor instead.

func (*ReceiptTokenAmount) GetCurrent

func (x *ReceiptTokenAmount) GetCurrent() *Token

func (*ReceiptTokenAmount) GetPrev

func (x *ReceiptTokenAmount) GetPrev() *Token

func (*ReceiptTokenAmount) ProtoMessage

func (*ReceiptTokenAmount) ProtoMessage()

func (*ReceiptTokenAmount) ProtoReflect added in v1.65.3

func (x *ReceiptTokenAmount) ProtoReflect() protoreflect.Message

func (*ReceiptTokenAmount) Reset

func (x *ReceiptTokenAmount) Reset()

func (*ReceiptTokenAmount) String

func (x *ReceiptTokenAmount) String() string

type ReplyAccountTokenAssets

type ReplyAccountTokenAssets struct {
	TokenAssets []*TokenAsset `protobuf:"bytes,1,rep,name=tokenAssets,proto3" json:"tokenAssets,omitempty"`
	// contains filtered or unexported fields
}

func (*ReplyAccountTokenAssets) Descriptor deprecated

func (*ReplyAccountTokenAssets) Descriptor() ([]byte, []int)

Deprecated: Use ReplyAccountTokenAssets.ProtoReflect.Descriptor instead.

func (*ReplyAccountTokenAssets) GetTokenAssets

func (x *ReplyAccountTokenAssets) GetTokenAssets() []*TokenAsset

func (*ReplyAccountTokenAssets) ProtoMessage

func (*ReplyAccountTokenAssets) ProtoMessage()

func (*ReplyAccountTokenAssets) ProtoReflect added in v1.65.3

func (x *ReplyAccountTokenAssets) ProtoReflect() protoreflect.Message

func (*ReplyAccountTokenAssets) Reset

func (x *ReplyAccountTokenAssets) Reset()

func (*ReplyAccountTokenAssets) String

func (x *ReplyAccountTokenAssets) String() string

type ReplyAddrRecvForTokens

type ReplyAddrRecvForTokens struct {
	TokenRecvs []*TokenRecv `protobuf:"bytes,1,rep,name=tokenRecvs,proto3" json:"tokenRecvs,omitempty"`
	// contains filtered or unexported fields
}

func (*ReplyAddrRecvForTokens) Descriptor deprecated

func (*ReplyAddrRecvForTokens) Descriptor() ([]byte, []int)

Deprecated: Use ReplyAddrRecvForTokens.ProtoReflect.Descriptor instead.

func (*ReplyAddrRecvForTokens) GetTokenRecvs

func (x *ReplyAddrRecvForTokens) GetTokenRecvs() []*TokenRecv

func (*ReplyAddrRecvForTokens) ProtoMessage

func (*ReplyAddrRecvForTokens) ProtoMessage()

func (*ReplyAddrRecvForTokens) ProtoReflect added in v1.65.3

func (x *ReplyAddrRecvForTokens) ProtoReflect() protoreflect.Message

func (*ReplyAddrRecvForTokens) Reset

func (x *ReplyAddrRecvForTokens) Reset()

func (*ReplyAddrRecvForTokens) String

func (x *ReplyAddrRecvForTokens) String() string

type ReplyTokenLogs

type ReplyTokenLogs struct {
	Logs []*LocalLogs `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"`
	// contains filtered or unexported fields
}

func (*ReplyTokenLogs) Descriptor deprecated

func (*ReplyTokenLogs) Descriptor() ([]byte, []int)

Deprecated: Use ReplyTokenLogs.ProtoReflect.Descriptor instead.

func (*ReplyTokenLogs) GetLogs

func (x *ReplyTokenLogs) GetLogs() []*LocalLogs

func (*ReplyTokenLogs) ProtoMessage

func (*ReplyTokenLogs) ProtoMessage()

func (*ReplyTokenLogs) ProtoReflect added in v1.65.3

func (x *ReplyTokenLogs) ProtoReflect() protoreflect.Message

func (*ReplyTokenLogs) Reset

func (x *ReplyTokenLogs) Reset()

func (*ReplyTokenLogs) String

func (x *ReplyTokenLogs) String() string

type ReplyTokens

type ReplyTokens struct {
	Tokens []*LocalToken `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"`
	// contains filtered or unexported fields
}

func (*ReplyTokens) Descriptor deprecated

func (*ReplyTokens) Descriptor() ([]byte, []int)

Deprecated: Use ReplyTokens.ProtoReflect.Descriptor instead.

func (*ReplyTokens) GetTokens

func (x *ReplyTokens) GetTokens() []*LocalToken

func (*ReplyTokens) ProtoMessage

func (*ReplyTokens) ProtoMessage()

func (*ReplyTokens) ProtoReflect added in v1.65.3

func (x *ReplyTokens) ProtoReflect() protoreflect.Message

func (*ReplyTokens) Reset

func (x *ReplyTokens) Reset()

func (*ReplyTokens) String

func (x *ReplyTokens) String() string

type ReqAccountTokenAssets

type ReqAccountTokenAssets struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Execer  string `protobuf:"bytes,2,opt,name=execer,proto3" json:"execer,omitempty"`
	// contains filtered or unexported fields
}

func (*ReqAccountTokenAssets) Descriptor deprecated

func (*ReqAccountTokenAssets) Descriptor() ([]byte, []int)

Deprecated: Use ReqAccountTokenAssets.ProtoReflect.Descriptor instead.

func (*ReqAccountTokenAssets) GetAddress

func (x *ReqAccountTokenAssets) GetAddress() string

func (*ReqAccountTokenAssets) GetExecer

func (x *ReqAccountTokenAssets) GetExecer() string

func (*ReqAccountTokenAssets) ProtoMessage

func (*ReqAccountTokenAssets) ProtoMessage()

func (*ReqAccountTokenAssets) ProtoReflect added in v1.65.3

func (x *ReqAccountTokenAssets) ProtoReflect() protoreflect.Message

func (*ReqAccountTokenAssets) Reset

func (x *ReqAccountTokenAssets) Reset()

func (*ReqAccountTokenAssets) String

func (x *ReqAccountTokenAssets) String() string

type ReqAddrTokens

type ReqAddrTokens struct {
	Addr      string   `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	Status    int32    `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
	Token     []string `protobuf:"bytes,3,rep,name=token,proto3" json:"token,omitempty"`
	Direction int32    `protobuf:"varint,4,opt,name=direction,proto3" json:"direction,omitempty"`
	Count     int32    `protobuf:"varint,5,opt,name=count,proto3" json:"count,omitempty"`
	FromKey   string   `protobuf:"bytes,6,opt,name=fromKey,proto3" json:"fromKey,omitempty"`
	// contains filtered or unexported fields
}

func (*ReqAddrTokens) Descriptor deprecated

func (*ReqAddrTokens) Descriptor() ([]byte, []int)

Deprecated: Use ReqAddrTokens.ProtoReflect.Descriptor instead.

func (*ReqAddrTokens) GetAddr

func (x *ReqAddrTokens) GetAddr() string

func (*ReqAddrTokens) GetCount

func (x *ReqAddrTokens) GetCount() int32

func (*ReqAddrTokens) GetDirection

func (x *ReqAddrTokens) GetDirection() int32

func (*ReqAddrTokens) GetFromKey

func (x *ReqAddrTokens) GetFromKey() string

func (*ReqAddrTokens) GetStatus

func (x *ReqAddrTokens) GetStatus() int32

func (*ReqAddrTokens) GetToken

func (x *ReqAddrTokens) GetToken() []string

func (*ReqAddrTokens) ProtoMessage

func (*ReqAddrTokens) ProtoMessage()

func (*ReqAddrTokens) ProtoReflect added in v1.65.3

func (x *ReqAddrTokens) ProtoReflect() protoreflect.Message

func (*ReqAddrTokens) Reset

func (x *ReqAddrTokens) Reset()

func (*ReqAddrTokens) String

func (x *ReqAddrTokens) String() string

type ReqTokenBalance

type ReqTokenBalance struct {
	Addresses   []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"`
	TokenSymbol string   `protobuf:"bytes,2,opt,name=tokenSymbol,proto3" json:"tokenSymbol,omitempty"`
	Execer      string   `protobuf:"bytes,3,opt,name=execer,proto3" json:"execer,omitempty"`
	// contains filtered or unexported fields
}

func (*ReqTokenBalance) Descriptor deprecated

func (*ReqTokenBalance) Descriptor() ([]byte, []int)

Deprecated: Use ReqTokenBalance.ProtoReflect.Descriptor instead.

func (*ReqTokenBalance) GetAddresses

func (x *ReqTokenBalance) GetAddresses() []string

func (*ReqTokenBalance) GetExecer

func (x *ReqTokenBalance) GetExecer() string

func (*ReqTokenBalance) GetTokenSymbol

func (x *ReqTokenBalance) GetTokenSymbol() string

func (*ReqTokenBalance) ProtoMessage

func (*ReqTokenBalance) ProtoMessage()

func (*ReqTokenBalance) ProtoReflect added in v1.65.3

func (x *ReqTokenBalance) ProtoReflect() protoreflect.Message

func (*ReqTokenBalance) Reset

func (x *ReqTokenBalance) Reset()

func (*ReqTokenBalance) String

func (x *ReqTokenBalance) String() string

type ReqTokenTx

type ReqTokenTx struct {
	Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	//表示取所有/from/to/其他的hash列表
	Flag      int32  `protobuf:"varint,2,opt,name=flag,proto3" json:"flag,omitempty"`
	Count     int32  `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
	Direction int32  `protobuf:"varint,4,opt,name=direction,proto3" json:"direction,omitempty"`
	Height    int64  `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"`
	Index     int64  `protobuf:"varint,6,opt,name=index,proto3" json:"index,omitempty"`
	Addr      string `protobuf:"bytes,7,opt,name=addr,proto3" json:"addr,omitempty"`
	// contains filtered or unexported fields
}

func (*ReqTokenTx) Descriptor deprecated

func (*ReqTokenTx) Descriptor() ([]byte, []int)

Deprecated: Use ReqTokenTx.ProtoReflect.Descriptor instead.

func (*ReqTokenTx) GetAddr

func (x *ReqTokenTx) GetAddr() string

func (*ReqTokenTx) GetCount

func (x *ReqTokenTx) GetCount() int32

func (*ReqTokenTx) GetDirection

func (x *ReqTokenTx) GetDirection() int32

func (*ReqTokenTx) GetFlag

func (x *ReqTokenTx) GetFlag() int32

func (*ReqTokenTx) GetHeight

func (x *ReqTokenTx) GetHeight() int64

func (*ReqTokenTx) GetIndex

func (x *ReqTokenTx) GetIndex() int64

func (*ReqTokenTx) GetSymbol

func (x *ReqTokenTx) GetSymbol() string

func (*ReqTokenTx) ProtoMessage

func (*ReqTokenTx) ProtoMessage()

func (*ReqTokenTx) ProtoReflect added in v1.65.3

func (x *ReqTokenTx) ProtoReflect() protoreflect.Message

func (*ReqTokenTx) Reset

func (x *ReqTokenTx) Reset()

func (*ReqTokenTx) String

func (x *ReqTokenTx) String() string

type ReqTokens

type ReqTokens struct {
	QueryAll   bool     `protobuf:"varint,1,opt,name=queryAll,proto3" json:"queryAll,omitempty"`
	Status     int32    `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
	Tokens     []string `protobuf:"bytes,3,rep,name=tokens,proto3" json:"tokens,omitempty"`
	SymbolOnly bool     `protobuf:"varint,4,opt,name=symbolOnly,proto3" json:"symbolOnly,omitempty"`
	// contains filtered or unexported fields
}

query

func (*ReqTokens) Descriptor deprecated

func (*ReqTokens) Descriptor() ([]byte, []int)

Deprecated: Use ReqTokens.ProtoReflect.Descriptor instead.

func (*ReqTokens) GetQueryAll

func (x *ReqTokens) GetQueryAll() bool

func (*ReqTokens) GetStatus

func (x *ReqTokens) GetStatus() int32

func (*ReqTokens) GetSymbolOnly

func (x *ReqTokens) GetSymbolOnly() bool

func (*ReqTokens) GetTokens

func (x *ReqTokens) GetTokens() []string

func (*ReqTokens) ProtoMessage

func (*ReqTokens) ProtoMessage()

func (*ReqTokens) ProtoReflect added in v1.65.3

func (x *ReqTokens) ProtoReflect() protoreflect.Message

func (*ReqTokens) Reset

func (x *ReqTokens) Reset()

func (*ReqTokens) String

func (x *ReqTokens) String() string

type Token

type Token struct {
	Name         string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Symbol       string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Introduction string `protobuf:"bytes,3,opt,name=introduction,proto3" json:"introduction,omitempty"`
	Total        int64  `protobuf:"varint,4,opt,name=total,proto3" json:"total,omitempty"`
	Price        int64  `protobuf:"varint,5,opt,name=price,proto3" json:"price,omitempty"`
	Owner        string `protobuf:"bytes,6,opt,name=owner,proto3" json:"owner,omitempty"`
	Creator      string `protobuf:"bytes,7,opt,name=creator,proto3" json:"creator,omitempty"`
	Status       int32  `protobuf:"varint,8,opt,name=status,proto3" json:"status,omitempty"`
	Category     int32  `protobuf:"varint,9,opt,name=category,proto3" json:"category,omitempty"`
	// contains filtered or unexported fields
}

state db

func (*Token) Descriptor deprecated

func (*Token) Descriptor() ([]byte, []int)

Deprecated: Use Token.ProtoReflect.Descriptor instead.

func (*Token) GetCategory

func (x *Token) GetCategory() int32

func (*Token) GetCreator

func (x *Token) GetCreator() string

func (*Token) GetIntroduction

func (x *Token) GetIntroduction() string

func (*Token) GetName

func (x *Token) GetName() string

func (*Token) GetOwner

func (x *Token) GetOwner() string

func (*Token) GetPrice

func (x *Token) GetPrice() int64

func (*Token) GetStatus

func (x *Token) GetStatus() int32

func (*Token) GetSymbol

func (x *Token) GetSymbol() string

func (*Token) GetTotal

func (x *Token) GetTotal() int64

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) ProtoReflect added in v1.65.3

func (x *Token) ProtoReflect() protoreflect.Message

func (*Token) Reset

func (x *Token) Reset()

func (*Token) String

func (x *Token) String() string

type TokenAccountResult

type TokenAccountResult struct {
	Token    string `json:"Token,omitempty"`
	Currency int32  `json:"currency,omitempty"`
	Balance  string `json:"balance,omitempty"`
	Frozen   string `json:"frozen,omitempty"`
	Addr     string `json:"addr,omitempty"`
}

TokenAccountResult about token account result

type TokenAction

type TokenAction struct {

	// Types that are assignable to Value:
	//	*TokenAction_TokenPreCreate
	//	*TokenAction_TokenFinishCreate
	//	*TokenAction_TokenRevokeCreate
	//	*TokenAction_Transfer
	//	*TokenAction_Withdraw
	//	*TokenAction_Genesis
	//	*TokenAction_TransferToExec
	//	*TokenAction_TokenMint
	//	*TokenAction_TokenBurn
	Value isTokenAction_Value `protobuf_oneof:"value"`
	Ty    int32               `protobuf:"varint,7,opt,name=Ty,proto3" json:"Ty,omitempty"`
	// contains filtered or unexported fields
}

action

func (*TokenAction) Descriptor deprecated

func (*TokenAction) Descriptor() ([]byte, []int)

Deprecated: Use TokenAction.ProtoReflect.Descriptor instead.

func (*TokenAction) GetGenesis

func (x *TokenAction) GetGenesis() *types.AssetsGenesis

func (*TokenAction) GetTokenBurn

func (x *TokenAction) GetTokenBurn() *TokenBurn

func (*TokenAction) GetTokenFinishCreate

func (x *TokenAction) GetTokenFinishCreate() *TokenFinishCreate

func (*TokenAction) GetTokenMint

func (x *TokenAction) GetTokenMint() *TokenMint

func (*TokenAction) GetTokenPreCreate

func (x *TokenAction) GetTokenPreCreate() *TokenPreCreate

func (*TokenAction) GetTokenRevokeCreate

func (x *TokenAction) GetTokenRevokeCreate() *TokenRevokeCreate

func (*TokenAction) GetTransfer

func (x *TokenAction) GetTransfer() *types.AssetsTransfer

func (*TokenAction) GetTransferToExec

func (x *TokenAction) GetTransferToExec() *types.AssetsTransferToExec

func (*TokenAction) GetTy

func (x *TokenAction) GetTy() int32

func (*TokenAction) GetValue

func (m *TokenAction) GetValue() isTokenAction_Value

func (*TokenAction) GetWithdraw

func (x *TokenAction) GetWithdraw() *types.AssetsWithdraw

func (*TokenAction) ProtoMessage

func (*TokenAction) ProtoMessage()

func (*TokenAction) ProtoReflect added in v1.65.3

func (x *TokenAction) ProtoReflect() protoreflect.Message

func (*TokenAction) Reset

func (x *TokenAction) Reset()

func (*TokenAction) String

func (x *TokenAction) String() string

type TokenAction_Genesis

type TokenAction_Genesis struct {
	Genesis *types.AssetsGenesis `protobuf:"bytes,6,opt,name=genesis,proto3,oneof"`
}

type TokenAction_TokenBurn

type TokenAction_TokenBurn struct {
	TokenBurn *TokenBurn `protobuf:"bytes,10,opt,name=tokenBurn,proto3,oneof"`
}

type TokenAction_TokenFinishCreate

type TokenAction_TokenFinishCreate struct {
	TokenFinishCreate *TokenFinishCreate `protobuf:"bytes,2,opt,name=tokenFinishCreate,proto3,oneof"`
}

type TokenAction_TokenMint

type TokenAction_TokenMint struct {
	TokenMint *TokenMint `protobuf:"bytes,9,opt,name=tokenMint,proto3,oneof"`
}

type TokenAction_TokenPreCreate

type TokenAction_TokenPreCreate struct {
	TokenPreCreate *TokenPreCreate `protobuf:"bytes,1,opt,name=tokenPreCreate,proto3,oneof"`
}

type TokenAction_TokenRevokeCreate

type TokenAction_TokenRevokeCreate struct {
	TokenRevokeCreate *TokenRevokeCreate `protobuf:"bytes,3,opt,name=tokenRevokeCreate,proto3,oneof"`
}

type TokenAction_Transfer

type TokenAction_Transfer struct {
	Transfer *types.AssetsTransfer `protobuf:"bytes,4,opt,name=transfer,proto3,oneof"`
}

type TokenAction_TransferToExec

type TokenAction_TransferToExec struct {
	TransferToExec *types.AssetsTransferToExec `protobuf:"bytes,8,opt,name=transferToExec,proto3,oneof"`
}

type TokenAction_Withdraw

type TokenAction_Withdraw struct {
	Withdraw *types.AssetsWithdraw `protobuf:"bytes,5,opt,name=withdraw,proto3,oneof"`
}

type TokenAsset

type TokenAsset struct {
	Symbol  string         `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Account *types.Account `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenAsset) Descriptor deprecated

func (*TokenAsset) Descriptor() ([]byte, []int)

Deprecated: Use TokenAsset.ProtoReflect.Descriptor instead.

func (*TokenAsset) GetAccount

func (x *TokenAsset) GetAccount() *types.Account

func (*TokenAsset) GetSymbol

func (x *TokenAsset) GetSymbol() string

func (*TokenAsset) ProtoMessage

func (*TokenAsset) ProtoMessage()

func (*TokenAsset) ProtoReflect added in v1.65.3

func (x *TokenAsset) ProtoReflect() protoreflect.Message

func (*TokenAsset) Reset

func (x *TokenAsset) Reset()

func (*TokenAsset) String

func (x *TokenAsset) String() string

type TokenBurn

type TokenBurn struct {
	Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Amount int64  `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenBurn) Descriptor deprecated

func (*TokenBurn) Descriptor() ([]byte, []int)

Deprecated: Use TokenBurn.ProtoReflect.Descriptor instead.

func (*TokenBurn) GetAmount

func (x *TokenBurn) GetAmount() int64

func (*TokenBurn) GetSymbol

func (x *TokenBurn) GetSymbol() string

func (*TokenBurn) ProtoMessage

func (*TokenBurn) ProtoMessage()

func (*TokenBurn) ProtoReflect added in v1.65.3

func (x *TokenBurn) ProtoReflect() protoreflect.Message

func (*TokenBurn) Reset

func (x *TokenBurn) Reset()

func (*TokenBurn) String

func (x *TokenBurn) String() string

type TokenClient

type TokenClient interface {
	// token 对外提供服务的接口
	//区块链接口
	GetTokenBalance(ctx context.Context, in *ReqTokenBalance, opts ...grpc.CallOption) (*types.Accounts, error)
}

TokenClient is the client API for Token service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewTokenClient

func NewTokenClient(cc grpc.ClientConnInterface) TokenClient

type TokenFinishCreate

type TokenFinishCreate struct {
	Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Owner  string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenFinishCreate) Descriptor deprecated

func (*TokenFinishCreate) Descriptor() ([]byte, []int)

Deprecated: Use TokenFinishCreate.ProtoReflect.Descriptor instead.

func (*TokenFinishCreate) GetOwner

func (x *TokenFinishCreate) GetOwner() string

func (*TokenFinishCreate) GetSymbol

func (x *TokenFinishCreate) GetSymbol() string

func (*TokenFinishCreate) ProtoMessage

func (*TokenFinishCreate) ProtoMessage()

func (*TokenFinishCreate) ProtoReflect added in v1.65.3

func (x *TokenFinishCreate) ProtoReflect() protoreflect.Message

func (*TokenFinishCreate) Reset

func (x *TokenFinishCreate) Reset()

func (*TokenFinishCreate) String

func (x *TokenFinishCreate) String() string

type TokenMint

type TokenMint struct {
	Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Amount int64  `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenMint) Descriptor deprecated

func (*TokenMint) Descriptor() ([]byte, []int)

Deprecated: Use TokenMint.ProtoReflect.Descriptor instead.

func (*TokenMint) GetAmount

func (x *TokenMint) GetAmount() int64

func (*TokenMint) GetSymbol

func (x *TokenMint) GetSymbol() string

func (*TokenMint) ProtoMessage

func (*TokenMint) ProtoMessage()

func (*TokenMint) ProtoReflect added in v1.65.3

func (x *TokenMint) ProtoReflect() protoreflect.Message

func (*TokenMint) Reset

func (x *TokenMint) Reset()

func (*TokenMint) String

func (x *TokenMint) String() string

type TokenPreCreate

type TokenPreCreate struct {
	Name         string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Symbol       string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Introduction string `protobuf:"bytes,3,opt,name=introduction,proto3" json:"introduction,omitempty"`
	Total        int64  `protobuf:"varint,4,opt,name=total,proto3" json:"total,omitempty"`
	Price        int64  `protobuf:"varint,5,opt,name=price,proto3" json:"price,omitempty"`
	Owner        string `protobuf:"bytes,6,opt,name=owner,proto3" json:"owner,omitempty"`
	Category     int32  `protobuf:"varint,7,opt,name=category,proto3" json:"category,omitempty"`
	// contains filtered or unexported fields
}

创建token,支持最大精确度是8位小数,即存入数据库的实际总额需要放大1e8倍

func (*TokenPreCreate) Descriptor deprecated

func (*TokenPreCreate) Descriptor() ([]byte, []int)

Deprecated: Use TokenPreCreate.ProtoReflect.Descriptor instead.

func (*TokenPreCreate) GetCategory

func (x *TokenPreCreate) GetCategory() int32

func (*TokenPreCreate) GetIntroduction

func (x *TokenPreCreate) GetIntroduction() string

func (*TokenPreCreate) GetName

func (x *TokenPreCreate) GetName() string

func (*TokenPreCreate) GetOwner

func (x *TokenPreCreate) GetOwner() string

func (*TokenPreCreate) GetPrice

func (x *TokenPreCreate) GetPrice() int64

func (*TokenPreCreate) GetSymbol

func (x *TokenPreCreate) GetSymbol() string

func (*TokenPreCreate) GetTotal

func (x *TokenPreCreate) GetTotal() int64

func (*TokenPreCreate) ProtoMessage

func (*TokenPreCreate) ProtoMessage()

func (*TokenPreCreate) ProtoReflect added in v1.65.3

func (x *TokenPreCreate) ProtoReflect() protoreflect.Message

func (*TokenPreCreate) Reset

func (x *TokenPreCreate) Reset()

func (*TokenPreCreate) String

func (x *TokenPreCreate) String() string

type TokenRecv

type TokenRecv struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	Recv  int64  `protobuf:"varint,2,opt,name=recv,proto3" json:"recv,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenRecv) Descriptor deprecated

func (*TokenRecv) Descriptor() ([]byte, []int)

Deprecated: Use TokenRecv.ProtoReflect.Descriptor instead.

func (*TokenRecv) GetRecv

func (x *TokenRecv) GetRecv() int64

func (*TokenRecv) GetToken

func (x *TokenRecv) GetToken() string

func (*TokenRecv) ProtoMessage

func (*TokenRecv) ProtoMessage()

func (*TokenRecv) ProtoReflect added in v1.65.3

func (x *TokenRecv) ProtoReflect() protoreflect.Message

func (*TokenRecv) Reset

func (x *TokenRecv) Reset()

func (*TokenRecv) String

func (x *TokenRecv) String() string

type TokenRevokeCreate

type TokenRevokeCreate struct {
	Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Owner  string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenRevokeCreate) Descriptor deprecated

func (*TokenRevokeCreate) Descriptor() ([]byte, []int)

Deprecated: Use TokenRevokeCreate.ProtoReflect.Descriptor instead.

func (*TokenRevokeCreate) GetOwner

func (x *TokenRevokeCreate) GetOwner() string

func (*TokenRevokeCreate) GetSymbol

func (x *TokenRevokeCreate) GetSymbol() string

func (*TokenRevokeCreate) ProtoMessage

func (*TokenRevokeCreate) ProtoMessage()

func (*TokenRevokeCreate) ProtoReflect added in v1.65.3

func (x *TokenRevokeCreate) ProtoReflect() protoreflect.Message

func (*TokenRevokeCreate) Reset

func (x *TokenRevokeCreate) Reset()

func (*TokenRevokeCreate) String

func (x *TokenRevokeCreate) String() string

type TokenServer

type TokenServer interface {
	// token 对外提供服务的接口
	//区块链接口
	GetTokenBalance(context.Context, *ReqTokenBalance) (*types.Accounts, error)
}

TokenServer is the server API for Token service.

type TokenType

type TokenType struct {
	types.ExecTypeBase
}

TokenType 执行器基类结构体

func NewType

func NewType(cfg *types.Chain33Config) *TokenType

NewType 创建执行器类型

func (*TokenType) CreateTx

func (t *TokenType) CreateTx(action string, msg json.RawMessage) (*types.Transaction, error)

CreateTx token 创建合约

func (*TokenType) GetLogMap

func (t *TokenType) GetLogMap() map[int64]*types.LogInfo

GetLogMap 获取log的映射对应关系

func (*TokenType) GetName

func (t *TokenType) GetName() string

GetName 获取执行器名称

func (*TokenType) GetPayload

func (t *TokenType) GetPayload() types.Message

GetPayload 获取token action

func (*TokenType) GetTypeMap

func (t *TokenType) GetTypeMap() map[string]int32

GetTypeMap 根据action的name获取type

func (*TokenType) RPC_Default_Process

func (t *TokenType) RPC_Default_Process(action string, msg interface{}) (*types.Transaction, error)

RPC_Default_Process rpc 默认处理

type UnimplementedTokenServer

type UnimplementedTokenServer struct {
}

UnimplementedTokenServer can be embedded to have forward compatible implementations.

func (*UnimplementedTokenServer) GetTokenBalance

Jump to

Keyboard shortcuts

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