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 Sign
- type Sinohope
- type SinohopeColumns
- type UnisatResponse
- type UnspentOutput
- type Utxo
- type UtxoData
- type Withdraw
- type WithdrawColumns
- type WithdrawTx
- type WithdrawTxColumns
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 )
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 )
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 ( BtcTxWithdrawPending = iota + 1 BtcTxWithdrawSuccess BtcTxWithdrawFailed BtcTxWithdrawSubmitTxMsg BtcTxWithdrawSignatureCompleted BtcTxWithdrawBroadcastSuccess BtcTxWithdrawBroadcastFailed BtcTxWithdrawConfirmed )
tx status sequence 1.1 BtcTxWithdrawPending 1.2 BtcTxWithdrawSubmitTxMsg 1.3 BtcTxWithdrawSignatureCompleted 1.4 BtcTxWithdrawBroadcastSuccess/BtcTxWithdrawBroadcastFailed 1.5 BtcTxWithdrawConfirmed 1.6 BtcTxWithdrawSuccess/BtcTxWithdrawFailed
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"` 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 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(64);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 int `json:"extra_info" gorm:"type:jsonb;comment:sinohope request extra_info"` }
func (Sinohope) Column ¶
func (Sinohope) Column() SinohopeColumns
type SinohopeColumns ¶
type UnisatResponse ¶
type Utxo ¶
type Utxo struct { Txid string `json:"txid"` Vout int64 `json:"vout"` Satoshi int64 `json:"satoshi"` ScriptType string `json:"scriptType"` ScriptPk string `json:"scriptPk"` CodeType int64 `json:"codeType"` Address string `json:"address"` Height int64 `json:"height"` Idx int64 `json:"idx"` IsOpInRBF bool `json:"isOpInRBF"` IsSpent bool `json:"isSpent"` Inscriptions []interface{} `json:"inscriptions"` }
type Withdraw ¶
type Withdraw struct { Base 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"` 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"` 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 (Withdraw) Column ¶
func (Withdraw) Column() WithdrawColumns
type WithdrawColumns ¶
type WithdrawTx ¶
type WithdrawTx struct { Base BtcTxID string `json:"btc_tx_id" gorm:"type:varchar(256);default:'';comment:bitcoin tx id"` B2TxHashes string `json:"btc_tx_hashes" gorm:"type:text;default:'';comment:bitcoin tx hash list"` BtcTx string `json:"btc_tx" gorm:"type:text;default:'';comment:bitcoin tx"` BtcTxHash string `json:"btc_txHash" gorm:"type:varchar(256);default:'';comment:bitcoin tx hash"` Status int `json:"status" gorm:"type:smallint;default:1"` Reason string `json:"reason" gorm:"type:varchar(256);default:'';comment:error reason"` }
func (WithdrawTx) Column ¶
func (WithdrawTx) Column() WithdrawTxColumns
func (WithdrawTx) TableName ¶
func (WithdrawTx) TableName() string
Click to show internal directories.
Click to hide internal directories.