Documentation
¶
Index ¶
- type BridgeBlockListener
- type BridgeBlockListenerDB
- type BridgeBlockListenerDBView
- type BridgeClaimDB
- type BridgeClaimView
- type BridgeClaimed
- type BridgeFinalize
- type BridgeFinalizeDB
- type BridgeFinalizeView
- type BridgeFundingPoolUpdate
- type BridgeFundingPoolUpdateDB
- type BridgeFundingPoolUpdateView
- type BridgeMsgHash
- type BridgeMsgHashDB
- type BridgeMsgHashView
- type BridgeMsgSent
- type BridgeMsgSentDB
- type BridgeMsgSentDBView
- type BridgeRecordDB
- type BridgeRecordDBView
- type BridgeRecords
- type StakingRecord
- type StakingRecordDB
- type StakingRecordView
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BridgeBlockListener ¶
type BridgeBlockListener struct {
GUID uuid.UUID `json:"guid" gorm:"primaryKey;DEFAULT replace(uuid_generate_v4()::text,'-','');serializer:uuid"`
ChainId string `json:"chain_id"`
BlockNumber *big.Int `json:"block_number" gorm:"serializer:u256"`
Created uint64 `json:"created"`
Updated uint64 `json:"updated"`
}
func (BridgeBlockListener) TableName ¶
func (BridgeBlockListener) TableName() string
type BridgeBlockListenerDB ¶
type BridgeBlockListenerDB interface {
BridgeBlockListenerDBView
SaveOrUpdateLastBlockNumber(lastBlock BridgeBlockListener) error
}
func NewBlockListenerDB ¶
func NewBlockListenerDB(db *gorm.DB) BridgeBlockListenerDB
type BridgeBlockListenerDBView ¶
type BridgeBlockListenerDBView interface {
GetLastBlockNumber(chainId string) (lastBlock *BridgeBlockListener, err error)
}
type BridgeClaimDB ¶
type BridgeClaimDB interface {
BridgeClaimView
StoreBridgeClaim(claim BridgeClaimed) error
StoreBridgeClaims(claims []BridgeClaimed) error
RelationMsgSent() error
}
func NewBridgeClaimDB ¶
func NewBridgeClaimDB(db *gorm.DB) BridgeClaimDB
type BridgeClaimView ¶
type BridgeClaimView interface {
}
type BridgeClaimed ¶
type BridgeClaimed struct {
GUID uuid.UUID `json:"guid" gorm:"primaryKey;DEFAULT replace(uuid_generate_v4()::text,'-','');serializer:uuid"`
TxHash common.Hash `json:"tx_hash" gorm:"serializer:bytes"`
MsgHash common.Hash `json:"msg_hash" gorm:"serializer:bytes"`
Timestamp uint64 `json:"timestamp"`
DestToken common.Address `json:"dest_token" gorm:"serializer:bytes"`
BlockNumber *big.Int `json:"block_number" gorm:"serializer:u256"`
TokenRelation bool
}
func (BridgeClaimed) TableName ¶
func (BridgeClaimed) TableName() string
type BridgeFinalize ¶
type BridgeFinalize struct {
GUID uuid.UUID `json:"guid" gorm:"primaryKey;DEFAULT replace(uuid_generate_v4()::text,'-','');serializer:uuid"`
TxHash common.Hash `json:"tx_hash" gorm:"serializer:bytes"`
DestToken common.Address `json:"dest_token" gorm:"serializer:bytes"`
}
func (BridgeFinalize) TableName ¶
func (BridgeFinalize) TableName() string
type BridgeFinalizeDB ¶
type BridgeFinalizeDB interface {
BridgeFinalizeView
StoreBridgeFinalize(finalize BridgeFinalize) error
StoreBridgeFinalizes(finalizes []BridgeFinalize) error
RelationClaim() error
}
func NewBridgeFinalizeDB ¶
func NewBridgeFinalizeDB(db *gorm.DB) BridgeFinalizeDB
type BridgeFinalizeView ¶
type BridgeFinalizeView interface {
}
type BridgeFundingPoolUpdate ¶
type BridgeFundingPoolUpdate struct {
GUID uuid.UUID `json:"guid" gorm:"primaryKey;DEFAULT replace(uuid_generate_v4()::text,'-','');serializer:uuid"`
TxHash string `json:"tx_hash"`
SourceChainId string `json:"source_chain_id"`
DestChainId string `json:"dest_chain_id"`
ReceiveAddress string `json:"timestamp"`
Amount string `json:"amount" `
TokenAddress string `json:"token_address"`
LayerType int
OnSend bool
}
func (BridgeFundingPoolUpdate) TableName ¶
func (BridgeFundingPoolUpdate) TableName() string
type BridgeFundingPoolUpdateDB ¶
type BridgeFundingPoolUpdateDB interface {
BridgeFundingPoolUpdateView
StoreBridgeFundingPools(bridgeFundingPoolUpdate []BridgeFundingPoolUpdate) error
StoreBridgeFundingPool(bridgeFundingPoolUpdate BridgeFundingPoolUpdate) error
L1GetCanStoreTransactions(chainId, receiveAddress string) ([]worker.L1ToL2, error)
L2GetCanStoreTransactions(chainId, receiveAddress string) ([]worker.L2ToL1, error)
UpdateCrossStatus(txHash string) error
}
func NewBridgeFundingPoolUpdateDB ¶
func NewBridgeFundingPoolUpdateDB(db *gorm.DB) BridgeFundingPoolUpdateDB
type BridgeFundingPoolUpdateView ¶
type BridgeFundingPoolUpdateView interface {
BridgeFundingPoolNoSendList() []BridgeFundingPoolUpdate
}
type BridgeMsgHash ¶
type BridgeMsgHash struct {
GUID uuid.UUID `json:"guid" gorm:"primaryKey;DEFAULT replace(uuid_generate_v4()::text,'-','');serializer:uuid"`
TxHash common.Hash `json:"tx_hash" gorm:"serializer:bytes"`
Fee *big.Int `json:"fee" gorm:"serializer:u256"`
MsgNonce *big.Int `json:"msg_nonce" gorm:"serializer:u256"`
MsgHash common.Hash `json:"msg_hash" gorm:"serializer:bytes"`
}
func (BridgeMsgHash) TableName ¶
func (BridgeMsgHash) TableName() string
type BridgeMsgHashDB ¶
type BridgeMsgHashDB interface {
BridgeMsgHashView
StoreBridgeMsgHash(msgHash BridgeMsgHash) error
StoreBridgeMsgHashs(msgHashList []BridgeMsgHash) error
RelationMsgHash() error
}
func NewBridgeMsgHashDB ¶
func NewBridgeMsgHashDB(db *gorm.DB) BridgeMsgHashDB
type BridgeMsgHashView ¶
type BridgeMsgHashView interface {
}
type BridgeMsgSent ¶
type BridgeMsgSent struct {
GUID uuid.UUID `json:"guid" gorm:"primaryKey;DEFAULT replace(uuid_generate_v4()::text,'-','');serializer:uuid"`
TxHash common.Hash `json:"tx_hash" gorm:"serializer:bytes"`
MsgHash common.Hash `json:"msg_hash" gorm:"serializer:bytes"`
DestHash common.Hash `json:"dest_hash" gorm:"serializer:bytes"`
DestBlockNumber *big.Int `json:"dest_block_number" gorm:"serializer:u256"`
DestTimestamp uint64 `json:"det_timestamp"`
DestToken common.Address `json:"dest_token" gorm:"serializer:bytes"`
Fee *big.Int `json:"fee" gorm:"serializer:u256"`
MsgNonce *big.Int `json:"msg_nonce" gorm:"serializer:u256"`
MsgHashRelation bool `json:"msg_hash_relation"`
BridgeRelation bool `json:"bridge_relation"`
ToChangeTransStatus bool `json:"to_change_trans_status"`
ToCrossStatus bool `json:"to_cross_status"`
ToBridgeRecord bool `json:"to_bridge_record"`
Data string `json:"data"`
}
func (BridgeMsgSent) TableName ¶
func (BridgeMsgSent) TableName() string
type BridgeMsgSentDB ¶
type BridgeMsgSentDB interface {
BridgeMsgSentDBView
StoreBridgeMsgSent(msgSent BridgeMsgSent) error
StoreBridgeMsgSents(msgSentList []BridgeMsgSent) error
CleanMsgSent() error
UpdateChangeStatus(txHash string) error
UpdateCrossStatus(txHash string) error
}
func NewBridgeMsgSentDB ¶
func NewBridgeMsgSentDB(db *gorm.DB) BridgeMsgSentDB
type BridgeMsgSentDBView ¶
type BridgeMsgSentDBView interface {
GetCanSaveDecodeList() (mList []BridgeMsgSent, err error)
GetCanCrossDataList() []BridgeMsgSent
GetCanChangeTransStatusList() []BridgeMsgSent
}
type BridgeRecordDB ¶
type BridgeRecordDB interface {
BridgeRecordDBView
StoreBridgeRecord(bridgeRecord BridgeRecords) error
StoreBridgeRecords(bridgeRecord []BridgeRecords) error
RelationClaimData() error
UpdatePointsStatus(guid uuid.UUID) error
}
func NewBridgeRecordDB ¶
func NewBridgeRecordDB(db *gorm.DB) BridgeRecordDB
type BridgeRecordDBView ¶
type BridgeRecordDBView interface {
GetBridgeRecordList(address string, page int, pageSize int, order string) (bridgeRecords []BridgeRecords, total int64)
GetNotPointsRecords() (bridgeRecords []BridgeRecords)
BridgeValid(address string) bool
}
type BridgeRecords ¶
type BridgeRecords struct {
GUID uuid.UUID `json:"guid" gorm:"primaryKey;DEFAULT replace(uuid_generate_v4()::text,'-','');serializer:uuid"`
SourceChainId string `json:"source_chain_id"`
DestChainId string `json:"dest_chain_id"`
SourceTxHash common.Hash `json:"source_tx_hash" gorm:"serializer:bytes"`
DestTxHash common.Hash `json:"dest_tx_hash" gorm:"serializer:bytes"`
SourceBlockNumber *big.Int `json:"source_block_number" gorm:"serializer:u256"`
DestBlockNumber *big.Int `json:"dest_block_number" gorm:"serializer:u256"`
SourceTokenAddress common.Address `json:"source_token_address" gorm:"serializer:bytes"`
DestTokenAddress common.Address `json:"dest_token_address" gorm:"serializer:bytes"`
MsgHash common.Hash `json:"msg_hash" gorm:"serializer:bytes"`
FromAddress common.Address `json:"fromAddress" gorm:"serializer:bytes"`
ToAddress common.Address `json:"toAddress" gorm:"serializer:bytes"`
Status int `json:"status"`
Amount *big.Int `json:"amount" gorm:"serializer:u256"`
Nonce *big.Int `json:"nonce" gorm:"serializer:u256"`
Fee *big.Int `json:"fee" gorm:"serializer:u256"`
BridgeRecordRelation bool `json:"bridge_record_relation""`
AssetType int `json:"asset_type"`
MsgSentTimestamp uint64 `json:"msg_sent_timestamp"`
ClaimTimestamp uint64 `json:"claim_timestamp"`
IsPoints bool `json:"is_points"`
}
func (BridgeRecords) TableName ¶
func (BridgeRecords) TableName() string
type StakingRecord ¶
type StakingRecord struct {
GUID uuid.UUID `json:"guid" gorm:"primaryKey;DEFAULT replace(uuid_generate_v4()::text,'-','');serializer:uuid"`
TxHash common.Hash `json:"txHash" gorm:"serializer:bytes"`
BlockNumber *big.Int `json:"blockNumber" gorm:"serializer:u256"`
UserAddress common.Address `json:"userAddress" gorm:"serializer:bytes"`
Token common.Address `json:"token" gorm:"serializer:bytes"`
Amount *big.Int `json:"amount" gorm:"serializer:u256"`
Reward *big.Int `json:"reward" gorm:"serializer:u256"`
StartPoolId *big.Int `json:"start_pool_id" gorm:"serializer:u256"`
EndPoolId *big.Int `json:"end_pool_id" gorm:"serializer:u256"`
TxType int `json:"txType"`
Status int `json:"status"`
AssetType int `json:"assetType"`
Timestamp uint64 `json:"timestamp"`
IsPoints bool `json:"is_points"`
}
func (StakingRecord) TableName ¶
func (StakingRecord) TableName() string
type StakingRecordDB ¶
type StakingRecordDB interface {
StakingRecordView
StoreStakingRecords(stakes []StakingRecord) error
StoreStakingRecord(stake StakingRecord) error
UpdatePointsStatus(guid uuid.UUID) error
}
func NewStakingRecordDB ¶
func NewStakingRecordDB(db *gorm.DB) StakingRecordDB
type StakingRecordView ¶
type StakingRecordView interface {
GetStakingRecords(address string, page int, pageSize int, order string, txType int) (stakingRecords []StakingRecord, total int64)
GetNotPointsRecords() (stakingRecords []StakingRecord)
StakingValid(address string) bool
}
Click to show internal directories.
Click to hide internal directories.