Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitTables ¶
Types ¶
type BlockLog ¶
type BlockLog struct { Id int64 Chain string BlockHash string ParentHash string Height int64 BlockTime int64 CreateTime int64 }
func (*BlockLog) BeforeCreate ¶
type Swap ¶
type Swap struct { Id int64 Type SwapType // bnb chain swap id should be hex encoded bytes without '0x' prefix BnbChainSwapId string // other chain swap id should be hex encoded bytes without '0x' prefix OtherChainSwapId string SenderAddr string ReceiverAddr string OtherChainAddr string InAmount string OutAmount string DeputyOutAmount string RandomNumberHash string `gorm:"not null"` ExpireHeight int64 Height int64 Timestamp int64 RandomNumber string Status SwapStatus CreateTime int64 UpdateTime int64 }
func (*Swap) BeforeCreate ¶
type SwapStatus ¶
type SwapStatus string
const ( SwapStatusOtherHTLTConfirmed SwapStatus = "OTHER_HTLT_CONFIRMED" SwapStatusOtherHTLTSent SwapStatus = "OTHER_HTLT_SENT" SwapStatusOtherHTLTExpired SwapStatus = "OTHER_HTLT_EXPIRED" SwapStatusOtherHTLTSentFailed SwapStatus = "OTHER_HTLT_SENT_FAILED" SwapStatusOtherClaimSent SwapStatus = "OTHER_CLAIM_SENT" SwapStatusOtherClaimConfirmed SwapStatus = "OTHER_CLAIM_CONFIRMED" SwapStatusOtherClaimSentFailed SwapStatus = "OTHER_CLAIM_SENT_FAILED" SwapStatusOtherRefundSent SwapStatus = "OTHER_REFUND_SENT" SwapStatusOtherRefundConfirmed SwapStatus = "OTHER_REFUND_CONFIRMED" SwapStatusOtherRefundSentFailed SwapStatus = "OTHER_REFUND_SENT_FAILED" SwapStatusBEP2HTLTSent SwapStatus = "BEP2_HTLT_SENT" SwapStatusBEP2HTLTConfirmed SwapStatus = "BEP2_HTLT_CONFIRMED" SwapStatusBEP2HTLTExpired SwapStatus = "BEP2_HTLT_EXPIRED" SwapStatusBEP2HTLTSentFailed SwapStatus = "BEP2_HTLT_SENT_FAILED" SwapStatusBEP2ClaimConfirmed SwapStatus = "BEP2_CLAIM_CONFIRMED" SwapStatusBEP2ClaimSent SwapStatus = "BEP2_CLAIM_SENT" SwapStatusBEP2ClaimSentFailed SwapStatus = "BEP2_CLAIM_SENT_FAILED" SwapStatusBEP2RefundSent SwapStatus = "BEP2_REFUND_SENT" SwapStatusBEP2RefundConfirmed SwapStatus = "BEP2_REFUND_CONFIRMED" SwapStatusBEP2RefundSentFailed SwapStatus = "BEP2_REFUND_SENT_FAILED" SwapStatusRejected SwapStatus = "REJECTED" )
type TxLog ¶
type TxLog struct { Id int64 Chain string // swap id should be hex encoded bytes without '0x' prefix SwapId string TxType TxType TxHash string ContractAddr string // sender address should be encoded by each executor SenderAddr string // receiver address should be encoded by each executor ReceiverAddr string SenderOtherChain string OtherChainAddr string InAmount string OutAmount string OutCoin string // random number hash should be hex encoded bytes without '0x' prefix RandomNumberHash string ExpireHeight int64 Timestamp int64 RandomNumber string BlockHash string Height int64 Status TxLogStatus ConfirmedNum int64 CreateTime int64 UpdateTime int64 }
func (*TxLog) BeforeCreate ¶
type TxLogStatus ¶
type TxLogStatus string
const ( TxStatusInit TxLogStatus = "INIT" TxStatusConfirmed TxLogStatus = "CONFIRMED" )
type TxSent ¶
type TxSent struct { Id int64 `json:"id"` Chain string `json:"chain"` SwapId string `json:"swap_id"` Type TxType `json:"type"` TxHash string `json:"tx_hash"` RandomNumberHash string `json:"random_number_hash"` ErrMsg string `json:"err_msg"` Status TxStatus `json:"status"` CreateTime int64 `json:"create_time"` UpdateTime int64 `json:"update_time"` }
func (*TxSent) BeforeCreate ¶
Click to show internal directories.
Click to hide internal directories.