Documentation ¶
Index ¶
- Constants
- type B2Node
- type B2NodeColumns
- type B2NodeIndex
- type Base
- type BtcIndex
- type Deposit
- type DepositColumns
- type Eps
- type EpsColumns
- type FeeRates
- type RollupDeposit
- type RollupDepositColumns
- type RollupIndex
- type Sinohope
- type SinohopeColumns
- type Withdraw
- type WithdrawAudit
- type WithdrawAuditColumns
- type WithdrawColumns
- type WithdrawRecord
- type WithdrawRecordColumns
- type WithdrawReset
- type WithdrawResetColumns
- type WithdrawSinohope
- type WithdrawSinohopeColumns
Constants ¶
View Source
const ( // b2 rollup status DepositB2TxStatusSuccess = iota // success DepositB2TxStatusPending // pending DepositB2TxStatusFailed // deposit invoke failed DepositB2TxStatusWaitMinedFailed // deposit wait mined failed DepositB2TxStatusTxHashExist // tx hash exist, deposit have been called DepositB2TxStatusWaitMinedStatusFailed // deposit wait mined status failed, status != 1 DepositB2TxStatusInsufficientBalance // deposit insufficient balance DepositB2TxStatusContextDeadlineExceeded // deposit client context deadline exceeded, Chain transaction is stuck DepositB2TxStatusFromAccountGasInsufficient // deposit evm from account gas insufficient DepositB2TxStatusWaitMined // deposit wait mined DepositB2TxStatusAAAddressNotFound // aa address not found, Start process processing separately DepositB2TxStatusIsPending DepositB2TxStatusNonceToLow DepositB2TxStatusWhitelistBtcAddress )
View Source
const ( DepositB2EoaTxStatusSuccess = iota // eoa transfer success DepositB2EoaTxStatusPending // eoa transfer pending DepositB2EoaTxStatusFailed // eoa transfer failed DepositB2EoaTxStatusWaitMinedFailed // eoa transfer wait mined failed DepositB2EoaTxStatusWaitMined DepositB2EoaTxStatusContextDeadlineExceeded // eoa transfer client context deadline exceeded DepositB2EoaTxStatusUnknown DepositB2EoaTxStatusNonceToLow DepositB2EoaStatusWhitelistBtcAddress )
View Source
const ( CallbackStatusSuccess = iota CallbackStatusPending )
View Source
const ( ListenerStatusSuccess = iota ListenerStatusPending )
View Source
const ( B2CheckStatusSuccess = iota B2CheckStatusPending B2CheckStatusFailed )
View Source
const ( EspStatus = 1 EspStatusSuccess = 2 // success )
View Source
const ( BtcTxWithdrawSubmit = "submit" BtcTxWithdrawPending = "pending" BtcTxWithdrawSinohopeSuccess = "sinohope_success" BtcTxWithdrawSuccess = "success" BtcTxWithdrawFailed = "failed" BtcTxWithdrawCheckAddressFailed = "check_address_failed" )
tx status sequence 1.1 BtcTxWithdrawSubmit 1.2 BtcTxWithdrawPending 1.3 BtcTxWithdrawSuccess/BtcTxWithdrawFailed
View Source
const ( BtcTxWithdrawSinohopeCallback = iota + 1 BtcTxWithdrawMPCCallback )
btc tx check status sequence
View Source
const ( WithdrawAuditStatusPending = iota + 1 WithdrawAuditStatusApprove WithdrawAuditStatusReject )
first audit
View Source
const ( WithdrawAuditMPCStatusWait = iota + 1 WithdrawAuditMPCStatusApprove WithdrawAuditMPCStatusReject )
second audit
View Source
const ( ResetTypeReset = 0 ResetTypeSpeedup = 1 )
View Source
const (
BtcTxTypeTransfer = iota // transfer
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type B2Node ¶
type B2Node struct { Base Height int64 `json:"height" gorm:"column:height"` BridgeModuleTxIndex int `json:"bridge_module_tx_index" gorm:"column:bridge_module_tx_index"` TxHash string `json:"tx_hash" gorm:"column:tx_hash;type:varchar(66);not null;default:''"` EventType string `json:"event_type" gorm:"column:event_type;type:varchar(60);not null;default:''"` Messages string `json:"messages" gorm:"column:messages;not null;default:''"` RawLog string `json:"raw_log" gorm:"column:raw_log;not null;default:''"` TxCode int `json:"tx_code" gorm:"column:tx_code"` TxData string `json:"tx_data" gorm:"column:tx_data;not null;default:''"` BridgeEventID string `json:"bridge_event_id" gorm:"column:bridge_event_id;type:varchar(66);not null;default:''"` Status int `json:"status" gorm:"column:status;type:smallint;default:1"` }
func (B2Node) Column ¶
func (B2Node) Column() B2NodeColumns
type B2NodeColumns ¶
type B2NodeIndex ¶
type B2NodeIndex struct { Base IndexBlock int64 `json:"index_block" gorm:"comment:b2node index block"` IndexTx int64 `json:"index_tx" gorm:"comment:b2node index tx"` }
func (B2NodeIndex) TableName ¶
func (B2NodeIndex) TableName() string
type BtcIndex ¶
type Deposit ¶
type Deposit struct { Base BtcBlockNumber int64 `json:"btc_block_number" gorm:"index;comment:bitcoin block number"` BtcTxIndex int64 `json:"btc_tx_index" gorm:"comment:bitcoin tx index"` BtcTxHash string `json:"btc_tx_hash" gorm:"type:varchar(64);not null;default:'';uniqueIndex;comment:bitcoin tx hash"` BtcTxType int `json:"btc_tx_type" gorm:"type:SMALLINT;default:0;comment:btc tx type"` BtcFroms string `json:"btc_froms" gorm:"type:jsonb;comment:bitcoin transfer, from may be multiple"` BtcFrom string `json:"btc_from" gorm:"type:varchar(64);not null;default:'';index"` BtcTos string `json:"btc_tos" gorm:"type:jsonb;comment:bitcoin transfer, to may be multiple"` BtcTo string `json:"btc_to" gorm:"type:varchar(64);not null;default:'';index"` BtcFromAAAddress string `json:"btc_from_aa_address" gorm:"type:varchar(42);default:'';comment:from aa address"` BtcFromEvmAddress string `json:"btc_from_evm_address" gorm:"type:varchar(42);default:'';comment:from evm address"` BtcValue int64 `json:"btc_value" gorm:"default:0;comment:bitcoin transfer value"` B2TxFrom string `json:"b2_tx_from" gorm:"type:varchar(42);default:'';comment:from address"` B2TxHash string `json:"b2_tx_hash" gorm:"type:varchar(66);not null;default:'';index;comment:b2 network tx hash"` B2TxNonce uint64 `json:"b2_tx_nonce" gorm:"default:0"` B2TxStatus int `json:"b2_tx_status" gorm:"type:SMALLINT;default:1"` B2TxRetry int `json:"b2_tx_retry" gorm:"type:SMALLINT;default:0"` B2EoaTxFrom string `json:"b2_eoa_tx_from" gorm:"type:varchar(42);default:'';comment:from address"` B2EoaTxNonce uint64 `json:"b2_eoa_tx_nonce" gorm:"default:0"` B2EoaTxHash string `json:"b2_eoa_tx_hash" gorm:"type:varchar(66);not null;default:'';comment:b2 network eoa tx hash"` B2EoaTxStatus int `json:"b2_eoa_tx_status" gorm:"type:SMALLINT;default:1"` BtcBlockTime time.Time `json:"btc_block_time"` CallbackStatus int `json:"callback_status" gorm:"type:SMALLINT;default:0"` ListenerStatus int `json:"listener_status" gorm:"type:SMALLINT;default:0"` B2TxCheck int `json:"b2_tx_check" gorm:"type:SMALLINT;default:1"` }
func (Deposit) Column ¶
func (Deposit) Column() DepositColumns
type DepositColumns ¶
type DepositColumns struct { BtcBlockNumber string BtcTxIndex string BtcTxHash string BtcTxType string BtcFroms string BtcFrom string BtcTos string BtcTo string BtcFromAAAddress string BtcFromEvmAddress string BtcValue string B2TxFrom string B2TxHash string B2TxNonce string B2TxStatus string B2TxRetry string B2EoaTxFrom string B2EoaTxNonce string B2EoaTxHash string B2EoaTxStatus string BtcBlockTime string CallbackStatus string ListenerStatus string B2TxCheck string }
type Eps ¶
type Eps struct { Base DepositID int64 `json:"deposit_id" gorm:"index;comment:deposit_history id"` B2From string `json:"b2_from" gorm:"type:varchar(64);not null;default:'';index;commit:b2 from"` B2To string `json:"b2_to" gorm:"type:varchar(64);not null;default:'';index;commit:b2 to"` BtcValue int64 `json:"btc_value" gorm:"default:0;comment:btc transfer value"` B2TxHash string `json:"b2_tx_hash" gorm:"type:varchar(66);not null;default:'';index;comment:b2 network tx hash"` B2TxTime time.Time `json:"b2_tx_time" gorm:"type:timestamp;comment:btc tx time"` B2BlockNumber int64 `json:"b2_block_number" gorm:"index;comment:b2 block number"` B2TransactionIndex int64 `json:"b2_transaction_index" gorm:"index;comment:b2 transaction index"` Status int `json:"status" gorm:"type:SMALLINT;default:1"` }
func (Eps) Column ¶
func (Eps) Column() EpsColumns
type EpsColumns ¶
type RollupDeposit ¶
type RollupDeposit struct { Base BtcTxHash string `json:"btc_tx_hash" gorm:"type:varchar(64);not null;default:'';comment:bitcoin tx hash"` BtcFromAAAddress string `json:"btc_from_aa_address" gorm:"type:varchar(42);default:'';comment:from aa address"` BtcValue int64 `json:"btc_value" gorm:"type:bigint;default:0;comment:bitcoin transfer value"` B2BlockNumber uint64 `json:"b2_block_number" gorm:"type:bigint;comment:b2 block number"` B2BlockHash string `json:"b2_block_hash" gorm:"type:varchar(256);comment:b2 block hash"` B2TxFrom string `json:"b2_tx_from" gorm:"type:varchar(42);default:'';comment:from address"` B2TxHash string `json:"b2_tx_hash" gorm:"type:varchar(256);default:'';uniqueIndex;comment:b2 network tx hash"` B2TxIndex uint `json:"b2_tx_index" gorm:"type:bigint;comment:b2 tx index"` B2LogIndex uint `json:"b2_log_index" gorm:"type:int;comment:b2 log index"` Status int `json:"status" gorm:"type:smallint;default:1"` }
func (RollupDeposit) Column ¶
func (RollupDeposit) Column() RollupDepositColumns
func (RollupDeposit) TableName ¶
func (RollupDeposit) TableName() string
type RollupDepositColumns ¶
type RollupIndex ¶
type RollupIndex struct { Base B2IndexBlock uint64 `json:"b2_index_block" gorm:"comment:b2 index block"` B2IndexTx uint `json:"b2_index_tx" gorm:"comment:b2 tx index"` B2LogIndex uint `json:"b2_log_tx" gorm:"comment:b2 log index"` }
func (RollupIndex) TableName ¶
func (RollupIndex) TableName() string
type Sinohope ¶
type Sinohope struct { Base RequestID string `json:"request_id" gorm:"type:varchar(128);not null;default:'';uniqueIndex;comment:sinohope request id"` RequestType int `json:"request_type" gorm:"type:SMALLINT;default:0;comment:sinohope callback type"` RequestDetail string `json:"request_detail" gorm:"type:jsonb;comment:sinohope request detail"` ExtraInfo string `json:"extra_info" gorm:"type:jsonb;comment:sinohope request extra_info"` }
func (Sinohope) Column ¶
func (Sinohope) Column() SinohopeColumns
type SinohopeColumns ¶
type Withdraw ¶
type Withdraw struct { Base UUID string `json:"uuid" gorm:"type:varchar(256);default:'';uniqueIndex;comment:b2 network withdraw_uuid"` RequestID string `json:"request_id" gorm:"type:varchar(256);default:'';uniqueIndex;comment:b2 network request id"` Fee int64 `json:"fee" gorm:"type:bigint;comment:fee"` BtcFrom string `json:"btc_from" gorm:"type:varchar(256);default:'';index"` BtcTo string `json:"btc_to" gorm:"type:varchar(256);default:'';index"` BtcValue int64 `json:"btc_value" gorm:"type:bigint;default:0;comment:bitcoin transfer value"` BtcRealValue int64 `json:"btc_real_value" gorm:"type:bigint;default:0;comment:bitcoin transfer real value"` BtcTxHash string `json:"btc_tx_hash" gorm:"type:varchar(256);default:'';comment:bitcoin tx hash"` B2BlockNumber uint64 `json:"b2_block_number" gorm:"type:bigint;comment:b2 block number"` B2BlockHash string `json:"b2_block_hash" gorm:"type:varchar(256);comment:b2 block hash"` B2TxFrom string `json:"b2_tx_from" gorm:"type:varchar(256);comment:b2 tx from"` B2TxTo string `json:"b2_tx_to" gorm:"type:varchar(256);comment:b2 tx to"` B2TxHash string `json:"b2_tx_hash" gorm:"type:varchar(256);default:'';uniqueIndex;comment:b2 network tx hash"` B2TxIndex uint `json:"b2_tx_index" gorm:"type:bigint;comment:b2 tx index"` B2LogIndex uint `json:"b2_log_index" gorm:"type:int;comment:b2 log index"` RefundTxHash string `json:"refund_tx_hash" gorm:"type:varchar(256);default:'';comment:bitcoin refund tx hash"` Status string `json:"status" gorm:"type:varchar(64)"` AuditStatus string `json:"audit_status" gorm:"type:varchar(64)"` }
func (Withdraw) Column ¶
func (Withdraw) Column() WithdrawColumns
type WithdrawAudit ¶ added in v1.1.0
type WithdrawAudit struct { Base APIRequestID string `json:"api_request_id" gorm:"type:varchar(256);comment:withdraw request id"` B2TxHash string `json:"b2_tx_hash" gorm:"type:varchar(256);default:'';comment:b2 network tx hash"` BtcFrom string `json:"btc_from" gorm:"type:varchar(256);default:'';index"` BtcTo string `json:"btc_to" gorm:"type:varchar(256);default:'';index"` BtcValue int64 `json:"btc_value" gorm:"type:bigint;default:0;comment:bitcoin transfer value"` BtcTxHash string `json:"btc_tx_hash" gorm:"type:varchar(256);default:'';comment:bitcoin tx hash"` Status int `json:"status" gorm:"type:smallint;default:1"` MPCStatus int `json:"mpc_status" gorm:"type:smallint;default:1"` }
func (WithdrawAudit) Column ¶ added in v1.1.0
func (WithdrawAudit) Column() WithdrawAuditColumns
func (WithdrawAudit) TableName ¶ added in v1.1.0
func (WithdrawAudit) TableName() string
type WithdrawAuditColumns ¶ added in v1.1.0
type WithdrawColumns ¶
type WithdrawColumns struct { BtcTxHash string BtcFrom string BtcTo string BtcValue string B2TxHash string B2BlockNumber string B2LogIndex string Status string RefundTxHash string AuditStatus string B2TxFrom string BtcRealValue string UUID string B2TxIndex string B2BlockHash string RequestID string Fee string }
type WithdrawRecord ¶ added in v1.2.0
type WithdrawRecord struct { Base WithdrawID int64 `json:"withdraw_id" gorm:"type:bigint;comment:withdraw id"` RequestID string `json:"request_id" gorm:"type:varchar(256);comment:withdraw request id"` B2TxHash string `json:"b2_tx_hash" gorm:"type:varchar(256);default:'';comment:b2 network tx hash"` B2TxIndex uint `json:"b2_tx_index" gorm:"type:bigint;comment:b2 tx index"` B2LogIndex uint `json:"b2_log_index" gorm:"type:int;comment:b2 log index"` BtcFrom string `json:"btc_from" gorm:"type:varchar(256);default:'';index"` BtcTo string `json:"btc_to" gorm:"type:varchar(256);default:'';index"` BtcValue int64 `json:"btc_value" gorm:"type:bigint;default:0;comment:bitcoin transfer value"` }
func (WithdrawRecord) Column ¶ added in v1.2.0
func (WithdrawRecord) Column() WithdrawRecordColumns
func (WithdrawRecord) TableName ¶ added in v1.2.0
func (WithdrawRecord) TableName() string
type WithdrawRecordColumns ¶ added in v1.2.0
type WithdrawReset ¶ added in v1.1.0
type WithdrawReset struct { Base RequestID string `json:"request_id" gorm:"type:varchar(256);default:'';uniqueIndex;comment:b2 network request id"` ResetType int `json:"reset_type" gorm:"type:SMALLINT;default:0"` B2TxHash string `json:"b2_tx_hash" gorm:"type:varchar(256);default:'';comment:b2 network tx hash"` Withdraw string `json:"withdraw" gorm:"type:jsonb;comment:withdraw history"` Sinohope string `json:"sinohope" gorm:"type:jsonb;comment:sinohope history"` }
func (WithdrawReset) Column ¶ added in v1.1.0
func (WithdrawReset) Column() WithdrawResetColumns
func (WithdrawReset) TableName ¶ added in v1.1.0
func (WithdrawReset) TableName() string
type WithdrawResetColumns ¶ added in v1.1.0
type WithdrawSinohope ¶ added in v1.1.0
type WithdrawSinohope struct { Base APIRequestID string `json:"api_request_id" gorm:"type:varchar(256);comment:withdraw request id"` B2TxHash string `json:"b2_tx_hash" gorm:"type:varchar(256);default:'';comment:b2 network tx hash"` SinohopeID string `json:"sinohope_id" gorm:"type:varchar(256)"` SinohopeRequestID string `json:"sinohope_request_id" gorm:"type:varchar(256)"` FeeRate string `json:"fee_rate" gorm:"type:varchar(256)"` State int `json:"state" gorm:"type:smallint"` }
func (WithdrawSinohope) Column ¶ added in v1.1.0
func (WithdrawSinohope) Column() WithdrawSinohopeColumns
func (WithdrawSinohope) TableName ¶ added in v1.1.0
func (WithdrawSinohope) TableName() string
Click to show internal directories.
Click to hide internal directories.