Documentation
¶
Index ¶
- Constants
- type BatchMint
- type BatchMintDB
- type BatchMintView
- type CrossChainTransfer
- type CrossChainTransferDB
- type CrossChainTransferView
- type DB
- type MigrateL1Shares
- type MigrateL1SharesDB
- type MigrateL1SharesView
- type TransferL2Share
- type TransferL2ShareDB
- type TransferL2ShareView
- type TransferToL2Bridge
- type TransferToL2BridgeDB
- type TransferToL2BridgeView
- type UnstakeBatch
- type UnstakeBatchDB
- type UnstakeBatchView
- type UpdateDepositFundingPoolBalance
- type UpdateDepositFundingPoolBalanceDB
- type UpdateDepositFundingPoolBalanceView
- type UpdateWithdrawFundingPoolBalance
- type UpdateWithdrawFundingPoolBalanceDB
- type UpdateWithdrawFundingPoolBalanceView
Constants ¶
View Source
const ( PendingStatus = 0 SuccessStatus = 2 FailStatus = 3 StakingStatus = 9 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchMint ¶
type BatchMint struct {
GUID uuid.UUID `gorm:"primaryKey;DEFAULT replace(uuid_generate_v4()::text,'-','')" json:"guid"`
StakerAddress common.Address `gorm:"column:staker_address;serializer:bytes" db:"staker_address" json:"staker_address" form:"staker_address"`
Batch *big.Int `gorm:"serializer:u256;column:batch" db:"batch" json:"batch" form:"batch"`
TxHash common.Hash `gorm:"column:tx_hash;serializer:bytes" db:"tx_hash" json:"tx_hash" form:"tx_hash"`
Status int8 `gorm:"column:status" db:"status" json:"status" form:"status"`
Timestamp int64 `gorm:"column:timestamp" db:"timestamp" json:"timestamp" form:"timestamp"`
}
type BatchMintDB ¶
type BatchMintDB interface {
BatchMintView
StoreBatchMint([]BatchMint) error
BuildBatchMint(in *pb.BatchMintRequest) []BatchMint
ChangeBatchMintSentStatusByTxHash(txHash string) error
UpdateBatchMintTransactionHash([]BatchMint) error
UpdateBatchMintFailStatus(BatchMint) error
}
func NewBatchMintDB ¶
func NewBatchMintDB(db *gorm.DB) BatchMintDB
type BatchMintView ¶
type CrossChainTransfer ¶
type CrossChainTransfer struct {
GUID uuid.UUID `gorm:"primaryKey;DEFAULT replace(uuid_generate_v4()::text,'-','')" json:"guid"`
SourceChainId *big.Int `gorm:"serializer:u256;column:source_chain_id" db:"source_chain_id" json:"source_chain_id" form:"source_chain_id"`
DestChainId *big.Int `gorm:"serializer:u256;column:dest_chain_id" db:"dest_chain_id" json:"dest_chain_id" form:"dest_chain_id"`
Fee *big.Int `gorm:"serializer:u256;column:fee" db:"fee" json:"fee" form:"fee"`
Nonce *big.Int `gorm:"serializer:u256;column:nonce" db:"nonce" json:"nonce" form:"nonce"`
SourceHash common.Hash `gorm:"column:source_hash;serializer:bytes" db:"source_hash" json:"source_hash" form:"source_hash"`
TxHash common.Hash `gorm:"column:tx_hash;serializer:bytes" db:"tx_hash" json:"tx_hash" form:"tx_hash"`
SourceSenderAddress common.Address `` /* 137-byte string literal not displayed */
DestReceiveAddress common.Address `` /* 133-byte string literal not displayed */
TokenAddress common.Address `gorm:"column:token_address;serializer:bytes" db:"token_address" json:"token_address" form:"token_address"`
Amount *big.Int `gorm:"serializer:u256;column:amount" db:"amount" json:"amount" form:"amount"`
Status int8 `gorm:"column:status" db:"status" json:"status" form:"status"`
Timestamp int64 `gorm:"column:timestamp" db:"timestamp" json:"timestamp" form:"timestamp"`
}
func (CrossChainTransfer) TableName ¶
func (CrossChainTransfer) TableName() string
type CrossChainTransferDB ¶
type CrossChainTransferDB interface {
CrossChainTransferView
StoreBatchCrossChainTransfer([]CrossChainTransfer) error
BuildCrossChainTransfer(in *pb.CrossChainTransferRequest, sourceHash common.Hash) CrossChainTransfer
CrossChainTransferBySourceHash(sourceHash string) (*CrossChainTransfer, error)
ChangeCrossChainTransferSentStatusByTxHash(txHash string) error
ChangeCrossChainTransferSuccessStatueByTxHash(txHash string) error
UpdateCrossChainTransferTransactionHash(CrossChainTransfer) error
UpdateCrossChainTransferStakingTransactionHash(CrossChainTransfer) error
UpdateCrossChainTransferFailStatus(CrossChainTransfer) error
}
func NewCrossChainTransferDB ¶
func NewCrossChainTransferDB(db *gorm.DB) CrossChainTransferDB
type CrossChainTransferView ¶
type CrossChainTransferView interface {
CrossChainTransferByTxHash(txHash string) (*CrossChainTransfer, error)
OldestPendingSentTransaction() ([]CrossChainTransfer, error)
OldestPendingNoSentTransaction() ([]CrossChainTransfer, error)
GetPeriodTotalFee(startTimestamp uint64, endTimeStamp uint64, tokenAddress common.Address) (*big.Int, error)
}
type DB ¶
type DB struct {
CrossChainTransfer CrossChainTransferDB
UpdateDepositFundingPoolBalance UpdateDepositFundingPoolBalanceDB
UpdateWithdrawFundingPoolBalance UpdateWithdrawFundingPoolBalanceDB
UnstakeBatch UnstakeBatchDB
TransferToL2Bridge TransferToL2BridgeDB
BatchMint BatchMintDB
// contains filtered or unexported fields
}
func (*DB) ExecuteSQLMigration ¶
type MigrateL1Shares ¶
type MigrateL1Shares struct {
}
func (MigrateL1Shares) TableName ¶
func (MigrateL1Shares) TableName() string
type MigrateL1SharesDB ¶
type MigrateL1SharesDB interface {
MigrateL1SharesView
}
func NewMigrateL1SharesDB ¶
func NewMigrateL1SharesDB(db *gorm.DB) MigrateL1SharesDB
type MigrateL1SharesView ¶
type MigrateL1SharesView interface {
}
type TransferL2Share ¶
type TransferL2Share struct {
}
func (TransferL2Share) TableName ¶
func (TransferL2Share) TableName() string
type TransferL2ShareDB ¶
type TransferL2ShareDB interface {
TransferL2ShareView
}
func NewTransferL2ShareDB ¶
func NewTransferL2ShareDB(db *gorm.DB) TransferL2ShareDB
type TransferL2ShareView ¶
type TransferL2ShareView interface {
}
type TransferToL2Bridge ¶
type TransferToL2Bridge struct {
GUID uuid.UUID `gorm:"primaryKey;DEFAULT replace(uuid_generate_v4()::text,'-','')" json:"guid"`
Batch *big.Int `gorm:"serializer:u256;column:batch" db:"batch" json:"batch" form:"batch"`
ChainId *big.Int `gorm:"serializer:u256;column:chain_id" db:"chain_id" json:"chain_id" form:"chain_id"`
StrategyAddress common.Address `gorm:"column:strategy_address;serializer:bytes" db:"strategy_address" json:"strategy_address" form:"strategy_address"`
TxHash common.Hash `gorm:"column:tx_hash;serializer:bytes" db:"tx_hash" json:"tx_hash" form:"tx_hash"`
Status int8 `gorm:"column:status" db:"status" json:"status" form:"status"`
Timestamp int64 `gorm:"column:timestamp" db:"timestamp" json:"timestamp" form:"timestamp"`
}
func (TransferToL2Bridge) TableName ¶
func (TransferToL2Bridge) TableName() string
type TransferToL2BridgeDB ¶
type TransferToL2BridgeDB interface {
TransferToL2BridgeView
StoreTransferToL2Bridge([]TransferToL2Bridge) error
BuildTransferToL2Bridge(in *pb.TransferToL2DappLinkBridgeRequest) TransferToL2Bridge
ChangeTransferToL2BridgeSentStatusByTxHash(txHash string) error
UpdateTransferToL2BridgeTransactionHash(TransferToL2Bridge) error
}
func NewTransferToL2BridgeDB ¶
func NewTransferToL2BridgeDB(db *gorm.DB) TransferToL2BridgeDB
type TransferToL2BridgeView ¶
type TransferToL2BridgeView interface {
TransferToL2BridgeByBatch(batch uint64) (*TransferToL2Bridge, error)
TransferToL2BridgeByTxHash(txHash string) (*TransferToL2Bridge, error)
OldestPendingSentTransaction() (*TransferToL2Bridge, error)
OldestPendingNoSentTransaction() (*TransferToL2Bridge, error)
}
type UnstakeBatch ¶
type UnstakeBatch struct {
GUID uuid.UUID `gorm:"primaryKey;DEFAULT replace(uuid_generate_v4()::text,'-','')" json:"guid"`
StrategyAddress common.Address `gorm:"column:strategy_address;serializer:bytes" db:"strategy_address" json:"strategy_address" form:"strategy_address"`
MsgNonce *big.Int `gorm:"serializer:u256;column:msg_nonce" db:"msg_nonce" json:"msg_nonce" form:"msg_nonce"`
SourceChainId *big.Int `gorm:"serializer:u256;column:source_chain_id" db:"source_chain_id" json:"source_chain_id" form:"source_chain_id"`
DestChainId *big.Int `gorm:"serializer:u256;column:dest_chain_id" db:"dest_chain_id" json:"dest_chain_id" form:"dest_chain_id"`
TxHash common.Hash `gorm:"column:tx_hash;serializer:bytes" db:"tx_hash" json:"tx_hash" form:"tx_hash"`
GasLimit *big.Int `gorm:"serializer:u256;column:gas_limit" db:"gas_limit" json:"gas_limit" form:"gas_limit"`
SourceHash common.Hash `gorm:"column:source_hash;serializer:bytes" db:"source_hash" json:"source_hash" form:"source_hash"`
Status int8 `gorm:"column:status" db:"status" json:"status" form:"status"`
Timestamp int64 `gorm:"column:timestamp" db:"timestamp" json:"timestamp" form:"timestamp"`
}
func (UnstakeBatch) TableName ¶
func (UnstakeBatch) TableName() string
type UnstakeBatchDB ¶
type UnstakeBatchDB interface {
UnstakeBatchView
StoreUnstakeBatch([]UnstakeBatch) error
BuildUnstakeBatch(in *pb.UnstakeBatchRequest, sourceHash common.Hash) []UnstakeBatch
ChangeUnstakeBatchSentStatusByTxHash(txHash string) error
UpdateUnstakeBatchTransactionHash(UnstakeBatch) error
}
func NewUnstakeBatchDB ¶
func NewUnstakeBatchDB(db *gorm.DB) UnstakeBatchDB
type UnstakeBatchView ¶
type UnstakeBatchView interface {
UnstakeBatchByTxHash(txHash string) (*UnstakeBatch, error)
UnstakeBatchBySourceHash(sourceHash string) (*UnstakeBatch, error)
UnstakeBatchsBySourceHash(sourceHash string) ([]UnstakeBatch, error)
OldestPendingSentTransaction() (*UnstakeBatch, error)
OldestPendingNoSentTransaction() (*UnstakeBatch, error)
}
type UpdateDepositFundingPoolBalance ¶
type UpdateDepositFundingPoolBalance struct {
GUID uuid.UUID `gorm:"primaryKey;DEFAULT replace(uuid_generate_v4()::text,'-','')" json:"guid"`
SourceChainId *big.Int `gorm:"serializer:u256;column:source_chain_id" db:"source_chain_id" json:"source_chain_id" form:"source_chain_id"`
DestChainId *big.Int `gorm:"serializer:u256;column:dest_chain_id" db:"dest_chain_id" json:"dest_chain_id" form:"dest_chain_id"`
SourceHash common.Hash `gorm:"column:source_hash;serializer:bytes" db:"source_hash" json:"source_hash" form:"source_hash"`
TxHash common.Hash `gorm:"column:tx_hash;serializer:bytes" db:"tx_hash" json:"tx_hash" form:"tx_hash"`
ReceiveAddress common.Address `gorm:"column:receive_address;serializer:bytes" db:"receive_address" json:"receive_address" form:"receive_address"`
TokenAddress common.Address `gorm:"column:token_address;serializer:bytes" db:"token_address" json:"token_address" form:"token_address"`
Amount *big.Int `gorm:"serializer:u256;column:amount" db:"amount" json:"amount" form:"amount"`
Status int8 `gorm:"column:status" db:"status" json:"status" form:"status"`
Timestamp int64 `gorm:"column:timestamp" db:"timestamp" json:"timestamp" form:"timestamp"`
}
func (UpdateDepositFundingPoolBalance) TableName ¶
func (UpdateDepositFundingPoolBalance) TableName() string
type UpdateDepositFundingPoolBalanceDB ¶
type UpdateDepositFundingPoolBalanceDB interface {
UpdateDepositFundingPoolBalanceView
StoreBatchUpdateFundingPoolBalance([]UpdateDepositFundingPoolBalance) error
BuildUpdateFundingPoolBalance(in *pb.UpdateDepositFundingPoolBalanceRequest, sourceHash common.Hash) UpdateDepositFundingPoolBalance
UpdateFundingPoolBalanceBySourceHash(sourceHash string) (*UpdateDepositFundingPoolBalance, error)
ChangeUpdateFundingPoolBalanceSentStatusByTxHash(txHash string) error
UpdateFundingPoolBalanceTransactionHash(UpdateDepositFundingPoolBalance) error
}
func NewDepositUpdateFundingPoolBalanceDB ¶
func NewDepositUpdateFundingPoolBalanceDB(db *gorm.DB) UpdateDepositFundingPoolBalanceDB
type UpdateDepositFundingPoolBalanceView ¶
type UpdateDepositFundingPoolBalanceView interface {
UpdateFundingPoolBalanceByTxHash(txHash string) (*UpdateDepositFundingPoolBalance, error)
OldestPendingSentTransaction() (*UpdateDepositFundingPoolBalance, error)
OldestPendingNoSentTransaction() (*UpdateDepositFundingPoolBalance, error)
}
type UpdateWithdrawFundingPoolBalance ¶
type UpdateWithdrawFundingPoolBalance struct {
GUID uuid.UUID `gorm:"primaryKey;DEFAULT replace(uuid_generate_v4()::text,'-','')" json:"guid"`
SourceChainId *big.Int `gorm:"serializer:u256;column:source_chain_id" db:"source_chain_id" json:"source_chain_id" form:"source_chain_id"`
DestChainId *big.Int `gorm:"serializer:u256;column:dest_chain_id" db:"dest_chain_id" json:"dest_chain_id" form:"dest_chain_id"`
SourceHash common.Hash `gorm:"column:source_hash;serializer:bytes" db:"source_hash" json:"source_hash" form:"source_hash"`
TxHash common.Hash `gorm:"column:tx_hash;serializer:bytes" db:"tx_hash" json:"tx_hash" form:"tx_hash"`
ReceiveAddress common.Address `gorm:"column:receive_address;serializer:bytes" db:"receive_address" json:"receive_address" form:"receive_address"`
TokenAddress common.Address `gorm:"column:token_address;serializer:bytes" db:"token_address" json:"token_address" form:"token_address"`
Amount *big.Int `gorm:"serializer:u256;column:amount" db:"amount" json:"amount" form:"amount"`
Status int8 `gorm:"column:status" db:"status" json:"status" form:"status"`
Timestamp int64 `gorm:"column:timestamp" db:"timestamp" json:"timestamp" form:"timestamp"`
}
func (UpdateWithdrawFundingPoolBalance) TableName ¶
func (UpdateWithdrawFundingPoolBalance) TableName() string
type UpdateWithdrawFundingPoolBalanceDB ¶
type UpdateWithdrawFundingPoolBalanceDB interface {
UpdateWithdrawFundingPoolBalanceView
StoreBatchUpdateFundingPoolBalance([]UpdateWithdrawFundingPoolBalance) error
BuildUpdateFundingPoolBalance(in *pb.UpdateWithdrawFundingPoolBalanceRequest, sourceHash common.Hash) UpdateWithdrawFundingPoolBalance
UpdateFundingPoolBalanceBySourceHash(sourceHash string) (*UpdateWithdrawFundingPoolBalance, error)
ChangeUpdateFundingPoolBalanceSentStatusByTxHash(txHash string) error
UpdateFundingPoolBalanceTransactionHash(UpdateWithdrawFundingPoolBalance) error
}
func NewWithdrawUpdateFundingPoolBalanceDB ¶
func NewWithdrawUpdateFundingPoolBalanceDB(db *gorm.DB) UpdateWithdrawFundingPoolBalanceDB
type UpdateWithdrawFundingPoolBalanceView ¶
type UpdateWithdrawFundingPoolBalanceView interface {
UpdateFundingPoolBalanceByTxHash(txHash string) (*UpdateWithdrawFundingPoolBalance, error)
OldestPendingSentTransaction() (*UpdateWithdrawFundingPoolBalance, error)
OldestPendingNoSentTransaction() (*UpdateWithdrawFundingPoolBalance, error)
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.