types

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChainTypeToString added in v1.0.1

func ChainTypeToString(c ChainType) string

func QGasSwapStateToString added in v1.0.1

func QGasSwapStateToString(t QGasSwapState) string

func SwapStateToString added in v1.0.1

func SwapStateToString(t SwapState) string

Types

type ChainType added in v1.0.1

type ChainType byte
const (
	ETH ChainType = iota
	NEO
	BSC
	InvalidChain
)

func StringToChainType added in v1.0.1

func StringToChainType(s string) ChainType

type QGasSwapInfo added in v1.0.1

type QGasSwapInfo struct {
	gorm.Model
	SwapType           QGasSwapType  `msg:"swapType" json:"swapType"`
	State              QGasSwapState `msg:"state" json:"state"`
	Chain              ChainType     `msg:"chain" json:"chain"`
	Amount             int64         `msg:"amount" json:"amount"`
	QlcUserAddr        string        `msg:"qlcUserAddr" json:"qlcUserAddr"`
	OwnerAddress       string        `msg:"ownerAddress" json:"ownerAddress"`
	QlcSendTxHash      string        `msg:"qlcSendTxHash" json:"qlcSendTxHash"`
	QlcRewardTxHash    string        `msg:"qlcRewardTxHash" json:"qlcRewardTxHash"`
	UserTxHash         string        `msg:"userTxHash" json:"userTxHash"`
	BlockStr           string        `msg:"blockStr" json:"blockStr"`
	CrossChainTxHash   string        `msg:"crossChainTxHash" json:"crossChainTxHash"`
	CrossChainUserAddr string        `msg:"crossChainUserAddr" json:"crossChainUserAddr"`
	StartTime          int64         `msg:"startTime" json:"startTime"`
	LastModifyTime     int64         `msg:"lastModifyTime" json:"lastModifyTime"`
}

type QGasSwapState added in v1.0.1

type QGasSwapState byte
const (
	// pledge
	QGasPledgeInit QGasSwapState = iota
	QGasPledgePending
	QGasPledgeDone

	// withdraw
	QGasWithDrawInit
	QGasWithDrawPending
	QGasWithDrawDone

	QGasInvalid
)

func StringToQGasSwapState added in v1.0.1

func StringToQGasSwapState(t string) QGasSwapState

type QGasSwapType added in v1.0.1

type QGasSwapType byte

type ChainType byte

const (

ETH ChainType = iota
NEO

)

const (
	QGasDeposit QGasSwapType = iota
	QGasWithdraw
)

type SwapInfo added in v1.0.1

type SwapInfo struct {
	gorm.Model
	State          SwapState `msg:"state" json:"state"`
	Chain          ChainType `msg:"chain" json:"chain"`
	Amount         int64     `msg:"amount" json:"amount"`
	EthTxHash      string    `msg:"ethTxHash" json:"ethTxHash"`
	NeoTxHash      string    `msg:"neoTxHash" json:"neoTxHash"`
	EthUserAddr    string    `msg:"ethUserAddr" json:"ethUserAddr"`
	NeoUserAddr    string    `msg:"neoUserAddr" json:"neoUserAddr"`
	StartTime      int64     `msg:"startTime" json:"startTime"`
	LastModifyTime int64     `msg:"lastModifyTime" json:"lastModifyTime"`
}

func (*SwapInfo) String added in v1.0.1

func (s *SwapInfo) String() string

type SwapPending added in v1.0.1

type SwapPending struct {
	gorm.Model
	Typ            SwapType  `msg:"typ" json:"typ"`
	Chain          ChainType `msg:"chain" json:"chain"`
	EthTxHash      string    `msg:"ethTxHash" json:"ethTxHash"`
	NeoTxHash      string    `msg:"neoTxHash" json:"neoTxHash"`
	LastModifyTime int64     `msg:"lastModifyTime" json:"lastModifyTime"`
}

type SwapState added in v1.0.1

type SwapState byte
const (
	// deposit
	DepositPending SwapState = iota
	DepositDone

	// withdraw
	WithDrawPending
	WithDrawDone

	WithDrawFail
	DepositRefund
	Invalid
)

func StringToSwapState added in v1.0.1

func StringToSwapState(t string) SwapState

type SwapType added in v1.0.1

type SwapType byte
const (
	Deposit SwapType = iota
	Withdraw
)

Jump to

Keyboard shortcuts

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