token

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TokenTxDB   = "token_tx"   //token_tx/token_tx/{tx_hash}
	TokenInfoDB = "token_info" //token_info/tokeninfo/{symbol}
	DefaultType = "_doc"

	ExecTokenX = "token"
)

token db

View Source
const (
	TxRecordMapping = `` /* 616-byte string literal not displayed */

	BalanceRecordMapping = `` /* 195-byte string literal not displayed */

	InfoRecordMapping = `` /* 916-byte string literal not displayed */

)

mapping

Variables

This section is empty.

Functions

func NewConvert

func NewConvert(paraTitle, symbol string, supports []string) db.ExecConvert

NewConvert NewConvert

Types

type Convert

type Convert struct {
	// contains filtered or unexported fields
}

Convert tx convert

func (*Convert) ConvertTx

func (e *Convert) ConvertTx(env *db.TxEnv, op int) ([]db.Record, error)

ConvertTx impl

func (*Convert) InitDB

func (e *Convert) InitDB(cli db.DBCreator) error

InitDB init db

func (*Convert) ParseMintAndBurnLog

func (e *Convert) ParseMintAndBurnLog(data *types.ReceiptData, symbol string, op int) []db.Record

ParseMintAndBurnLog ParseMintAndBurnLog

type Record

type Record struct {
	*db.IKey
	*db.Op
	// contains filtered or unexported fields
}

Record db token

func (*Record) Value

func (r *Record) Value() []byte

Value impl

type RecordToken

type RecordToken struct {
	*db.IKey
	*db.Op
	// contains filtered or unexported fields
}

RecordToken db token

func (*RecordToken) Value

func (r *RecordToken) Value() []byte

Value impl

type Token

type Token struct {
	Name         string `json:"name,omitempty"`
	Symbol       string `json:"symbol,omitempty"`
	Amount       int64  `json:"amount,omitempty"`
	Owner        string `json:"owner,omitempty"`
	Creator      string `json:"creator,omitempty"`
	Introduction string `json:"introduction,omitempty"`
	// Price 发行该token愿意承担的费用
	Price int64 `json:"price,omitempty"`
	// Category: 0.普通类别 1.可增发燃烧
	Category int64 `json:"category,omitempty"`
	// Status: 0.预创建 1.完成创建 2.撤销
	Status        int64 `json:"status,omitempty"`
	PrepareHeight int64 `json:"prepare_height,omitempty"`
	CreateHeight  int64 `json:"create_height,omitempty"`
	RevokeHeight  int64 `json:"revoke_height,omitempty"`
}

Token Token

type TxOption

type TxOption struct {
	//token
	Symbol       string `json:"symbol,omitempty"`
	To           string `json:"to,omitempty"`
	ExecName     string `json:"exec_name,omitempty"`
	Amount       int64  `json:"amount,omitempty"`
	Name         string `json:"name,omitempty"`
	Introduction string `json:"introduction,omitempty"`
	Total        int64  `json:"total,omitempty"`
	Price        int64  `json:"price,omitempty"`
	Owner        string `json:"owner,omitempty"`
	Category     int64  `json:"category,omitempty"`
	Note         string `json:"note,omitempty"`
}

TxOption TxOption

Jump to

Keyboard shortcuts

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