deputy

package
v0.0.0-...-11a4fed Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2023 License: LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deputy

type Deputy struct {
	DB            *gorm.DB
	Config        *util.Config
	BnbExecutor   common.Executor
	OtherExecutor common.Executor
	// contains filtered or unexported fields
}

func NewDeputy

func NewDeputy(db *gorm.DB, cfg *util.Config, bnbExecutor common.Executor, otherExecutor common.Executor) *Deputy

func (*Deputy) Alert

func (deputy *Deputy) Alert()

func (*Deputy) BEP2ExpireUserHTLT

func (deputy *Deputy) BEP2ExpireUserHTLT()

func (*Deputy) BEP2SendClaim

func (deputy *Deputy) BEP2SendClaim()

func (*Deputy) BEP2SendHTLT

func (deputy *Deputy) BEP2SendHTLT()

func (*Deputy) BEP2SendRefund

func (deputy *Deputy) BEP2SendRefund()

func (*Deputy) CheckTxSent

func (deputy *Deputy) CheckTxSent()

func (*Deputy) CheckTxSentRoutine

func (deputy *Deputy) CheckTxSentRoutine()

func (*Deputy) CompensateNewSwap

func (deputy *Deputy) CompensateNewSwap(tx *gorm.DB, chain string, newSwaps []*store.Swap) error

func (*Deputy) ConfirmBEP2Tx

func (deputy *Deputy) ConfirmBEP2Tx()

func (*Deputy) ConfirmOtherTx

func (deputy *Deputy) ConfirmOtherTx()

func (*Deputy) ConfirmTx

func (deputy *Deputy) ConfirmTx(tx *gorm.DB, txLog *store.TxLog) error

func (*Deputy) FailedSwaps

func (deputy *Deputy) FailedSwaps(offset int, pageCount int) ([]*common.SwapStatus, int, error)

func (*Deputy) GetConfirmedTxsLog

func (deputy *Deputy) GetConfirmedTxsLog(tx *gorm.DB, chain string, swap *store.Swap) ([]*store.TxLog, error)

func (*Deputy) GetCurrentBlockLog

func (deputy *Deputy) GetCurrentBlockLog(chain string) *store.BlockLog

func (*Deputy) GetMode

func (deputy *Deputy) GetMode() common.DeputyMode

func (*Deputy) GetReconciliationStatus

func (deputy *Deputy) GetReconciliationStatus() (*common.ReconciliationStatus, error)

func (*Deputy) GetSwapsByTypeAndStatuses

func (deputy *Deputy) GetSwapsByTypeAndStatuses(swapType store.SwapType, statuses []store.SwapStatus) []*store.Swap

func (*Deputy) GetTxLogByTxType

func (deputy *Deputy) GetTxLogByTxType(chain string, txType store.TxType, swap *store.Swap) *store.TxLog

func (*Deputy) GetTxsSentByStatus

func (deputy *Deputy) GetTxsSentByStatus(status []store.TxStatus) []*store.TxSent

func (*Deputy) GetTxsSentByType

func (deputy *Deputy) GetTxsSentByType(chain string, txType store.TxType, swap *store.Swap) []*store.TxSent

func (*Deputy) Metrics

func (deputy *Deputy) Metrics()

func (*Deputy) OtherExpireUserHTLT

func (deputy *Deputy) OtherExpireUserHTLT()

func (*Deputy) OtherSendClaim

func (deputy *Deputy) OtherSendClaim()

func (*Deputy) OtherSendHTLT

func (deputy *Deputy) OtherSendHTLT()

func (*Deputy) OtherSendRefund

func (deputy *Deputy) OtherSendRefund()

func (*Deputy) Recon

func (deputy *Deputy) Recon()

func (*Deputy) ReconRoutine

func (deputy *Deputy) ReconRoutine()

func (*Deputy) ResendTx

func (deputy *Deputy) ResendTx(id int64) (string, error)

func (*Deputy) RunBEP2HotWalletOverflow

func (deputy *Deputy) RunBEP2HotWalletOverflow()

func (*Deputy) RunOtherHotWalletOverflow

func (deputy *Deputy) RunOtherHotWalletOverflow()

func (*Deputy) SetMode

func (deputy *Deputy) SetMode(mode common.DeputyMode)

func (*Deputy) ShouldSendHTLT

func (deputy *Deputy) ShouldSendHTLT() bool

func (*Deputy) Start

func (deputy *Deputy) Start()

func (*Deputy) Status

func (deputy *Deputy) Status() (*common.DeputyStatus, error)

func (*Deputy) UpdateSwapStatus

func (deputy *Deputy) UpdateSwapStatus(swap *store.Swap, status store.SwapStatus, deputyOutAmount string)

func (*Deputy) UpdateSwapStatusWhenConfirmTx

func (deputy *Deputy) UpdateSwapStatusWhenConfirmTx(tx *gorm.DB, swapType store.SwapType, txLog *store.TxLog,
	inStatuses []store.SwapStatus, notInStatuses []store.SwapStatus, updateStatus store.SwapStatus, randomNumber string) error

func (*Deputy) UpdateTxSentStatus

func (deputy *Deputy) UpdateTxSentStatus(txSent *store.TxSent, status store.TxStatus)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL