Documentation ¶
Index ¶
- type BinanceCallBackJob
- type BinanceListener
- type CrossbellCallBackJob
- type CrossbellListener
- func (l *CrossbellListener) DepositRequestedCallback(fromChainId *big.Int, tx bridgeCore.Transaction, data []byte) error
- func (l *CrossbellListener) IsUpTodate() bool
- func (l *CrossbellListener) NewJobFromDB(job *bridgeCoreModels.Job) (bridgeCore.JobHandler, error)
- func (l *CrossbellListener) ProvideReceiptSignatureCallback(fromChainId *big.Int, tx bridgeCore.Transaction, data []byte) error
- func (l *CrossbellListener) RequestDepositedDoneCallback(fromChainId *big.Int, tx bridgeCore.Transaction, data []byte) error
- func (l *CrossbellListener) RequestWithdrewDoneCallback(fromChainId *big.Int, tx bridgeCore.Transaction, data []byte) error
- func (l *CrossbellListener) StoreBatchSubmitWithdrawalSignatures(fromChainId *big.Int, tx bridgeCore.Transaction, data []byte) error
- func (l *CrossbellListener) StoreCrossbellDepositedCallback(fromChainId *big.Int, tx bridgeCore.Transaction, data []byte) error
- func (l *CrossbellListener) StoreDepositAck(fromChainId *big.Int, tx bridgeCore.Transaction, data []byte) error
- func (l *CrossbellListener) StoreRequestDeposit(fromChainId *big.Int, tx bridgeCore.Transaction, data []byte) error
- func (l *CrossbellListener) StoreRequestWithdrawal(fromChainId *big.Int, tx bridgeCore.Transaction, data []byte) error
- type EmptyTransaction
- type EthBlock
- type EthCallbackJob
- type EthListenJob
- type EthLog
- type EthTransaction
- type EthereumListener
- func (e *EthereumListener) AddListeners(m map[string]bridgeCore.Listener)
- func (e *EthereumListener) AddTask(task bridgeCore.TaskHandler)
- func (e *EthereumListener) Close()
- func (e *EthereumListener) Config() *bridgeCore.LsConfig
- func (e *EthereumListener) Context() context.Context
- func (e *EthereumListener) GetBlock(height uint64) (bridgeCore.Block, error)
- func (e *EthereumListener) GetBlockWithLogs(height uint64) (bridgeCore.Block, error)
- func (e *EthereumListener) GetChainID() (*big.Int, error)
- func (e *EthereumListener) GetCurrentBlock() bridgeCore.Block
- func (e *EthereumListener) GetDecimals() map[uint64]uint64
- func (e *EthereumListener) GetDomainSeparators() map[uint64]string
- func (e *EthereumListener) GetEthClient() utils.EthClient
- func (e *EthereumListener) GetInitHeight() uint64
- func (e *EthereumListener) GetLatestBlock() (bridgeCore.Block, error)
- func (e *EthereumListener) GetLatestBlockHeight() (uint64, error)
- func (e *EthereumListener) GetListenHandleJob(subscriptionName string, tx bridgeCore.Transaction, eventId string, ...) bridgeCore.JobHandler
- func (e *EthereumListener) GetListener(s string) bridgeCore.Listener
- func (e *EthereumListener) GetName() string
- func (e *EthereumListener) GetPreventOmissionRange() uint64
- func (e *EthereumListener) GetProcessedBlock() (bridgeCore.Block, error)
- func (e *EthereumListener) GetReceipt(txHash common.Hash) (*ethtypes.Receipt, error)
- func (e *EthereumListener) GetSafeBlockRange() uint64
- func (e *EthereumListener) GetScanUrls() map[uint64]string
- func (e *EthereumListener) GetStore() stores.MainStore
- func (e *EthereumListener) GetSubscriptions() map[string]*bridgeCore.Subscribe
- func (e *EthereumListener) GetTask(index int) bridgeCore.TaskHandler
- func (e *EthereumListener) GetTasks() []bridgeCore.TaskHandler
- func (e *EthereumListener) GetValidatorSign() bridgeCoreUtils.ISign
- func (e *EthereumListener) IsDisabled() bool
- func (e *EthereumListener) IsUpTodate() bool
- func (e *EthereumListener) NewJobFromDB(job *bridgeCoreModels.Job) (bridgeCore.JobHandler, error)
- func (e *EthereumListener) Period() time.Duration
- func (e *EthereumListener) SaveCurrentBlockToDB() error
- func (e *EthereumListener) SaveTransactionsToDB(txs []bridgeCore.Transaction) error
- func (e *EthereumListener) SendCallbackJobs(listeners map[string]bridgeCore.Listener, subscriptionName string, ...)
- func (e *EthereumListener) SetInitHeight(height uint64)
- func (e *EthereumListener) SetPrepareJobChan(jobChan chan bridgeCore.JobHandler)
- func (e *EthereumListener) Start()
- func (e *EthereumListener) UpdateCurrentBlock(block bridgeCore.Block) error
- func (l *EthereumListener) WithdrewDone2SlackCallback(fromChainId *big.Int, tx bridgeCore.Transaction, data []byte) error
- type PolygonCallBackJob
- type PolygonListener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinanceCallBackJob ¶
type BinanceCallBackJob struct {
*EthCallbackJob
}
type BinanceListener ¶
type BinanceListener struct { *EthereumListener // contains filtered or unexported fields }
func NewBinanceListener ¶
func NewBinanceListener(ctx context.Context, cfg *bridgeCore.LsConfig, helpers utils.Utils, store bridgeCoreStores.MainStore) (*BinanceListener, error)
func (*BinanceListener) NewJobFromDB ¶
func (l *BinanceListener) NewJobFromDB(job *bridgeCoreModels.Job) (bridgeCore.JobHandler, error)
func (*BinanceListener) WithdrewDone2SlackCallback ¶
func (l *BinanceListener) WithdrewDone2SlackCallback(fromChainId *big.Int, tx bridgeCore.Transaction, data []byte) error
WithdrewDone2SlackCallback send the withdrew event rto slack channel through slack hook
type CrossbellCallBackJob ¶
type CrossbellCallBackJob struct {
*EthCallbackJob
}
type CrossbellListener ¶
type CrossbellListener struct { *EthereumListener // contains filtered or unexported fields }
func NewCrossbellListener ¶
func NewCrossbellListener(ctx context.Context, cfg *bridgeCore.LsConfig, helpers utils.Utils, store bridgeCoreStores.MainStore) (*CrossbellListener, error)
func (*CrossbellListener) DepositRequestedCallback ¶
func (l *CrossbellListener) DepositRequestedCallback(fromChainId *big.Int, tx bridgeCore.Transaction, data []byte) error
func (*CrossbellListener) IsUpTodate ¶
func (l *CrossbellListener) IsUpTodate() bool
func (*CrossbellListener) NewJobFromDB ¶
func (l *CrossbellListener) NewJobFromDB(job *bridgeCoreModels.Job) (bridgeCore.JobHandler, error)
func (*CrossbellListener) ProvideReceiptSignatureCallback ¶
func (l *CrossbellListener) ProvideReceiptSignatureCallback(fromChainId *big.Int, tx bridgeCore.Transaction, data []byte) error
func (*CrossbellListener) RequestDepositedDoneCallback ¶
func (l *CrossbellListener) RequestDepositedDoneCallback(fromChainId *big.Int, tx bridgeCore.Transaction, data []byte) error
set requestDeposit as done
func (*CrossbellListener) RequestWithdrewDoneCallback ¶
func (l *CrossbellListener) RequestWithdrewDoneCallback(fromChainId *big.Int, tx bridgeCore.Transaction, data []byte) error
StoreMainchainWithdrawCallback stores the receipt to own database for future check from ProvideReceiptSignatureCallback
func (*CrossbellListener) StoreBatchSubmitWithdrawalSignatures ¶
func (l *CrossbellListener) StoreBatchSubmitWithdrawalSignatures(fromChainId *big.Int, tx bridgeCore.Transaction, data []byte) error
func (*CrossbellListener) StoreCrossbellDepositedCallback ¶
func (l *CrossbellListener) StoreCrossbellDepositedCallback(fromChainId *big.Int, tx bridgeCore.Transaction, data []byte) error
store Deposited event
func (*CrossbellListener) StoreDepositAck ¶
func (l *CrossbellListener) StoreDepositAck(fromChainId *big.Int, tx bridgeCore.Transaction, data []byte) error
func (*CrossbellListener) StoreRequestDeposit ¶
func (l *CrossbellListener) StoreRequestDeposit(fromChainId *big.Int, tx bridgeCore.Transaction, data []byte) error
store deposit request from mainchain
func (*CrossbellListener) StoreRequestWithdrawal ¶
func (l *CrossbellListener) StoreRequestWithdrawal(fromChainId *big.Int, tx bridgeCore.Transaction, data []byte) error
type EmptyTransaction ¶
type EmptyTransaction struct {
// contains filtered or unexported fields
}
func NewEmptyTransaction ¶
func (*EmptyTransaction) GetData ¶
func (b *EmptyTransaction) GetData() []byte
func (*EmptyTransaction) GetFromAddress ¶
func (b *EmptyTransaction) GetFromAddress() string
func (*EmptyTransaction) GetHash ¶
func (b *EmptyTransaction) GetHash() common.Hash
func (*EmptyTransaction) GetToAddress ¶
func (b *EmptyTransaction) GetToAddress() string
func (*EmptyTransaction) GetValue ¶
func (b *EmptyTransaction) GetValue() *big.Int
type EthBlock ¶
type EthBlock struct {
// contains filtered or unexported fields
}
func NewEthBlock ¶
func (*EthBlock) GetLogs ¶
func (b *EthBlock) GetLogs() []bridgeCore.Log
func (*EthBlock) GetTimestamp ¶
func (*EthBlock) GetTransactions ¶
func (b *EthBlock) GetTransactions() []bridgeCore.Transaction
type EthCallbackJob ¶
type EthCallbackJob struct { *bridgeCore.BaseJob // contains filtered or unexported fields }
func NewEthCallbackJob ¶
func NewEthCallbackJob(listener bridgeCore.Listener, method string, tx bridgeCore.Transaction, data []byte, fromChainID *big.Int, helpers utils.Utils) *EthCallbackJob
func (*EthCallbackJob) Process ¶
func (e *EthCallbackJob) Process() ([]byte, error)
func (*EthCallbackJob) Save ¶
func (e *EthCallbackJob) Save() error
func (*EthCallbackJob) Update ¶
func (e *EthCallbackJob) Update(status string) error
type EthListenJob ¶
type EthListenJob struct {
*bridgeCore.BaseJob
}
func NewEthListenJob ¶
func NewEthListenJob(jobType int, listener bridgeCore.Listener, subscriptionName string, tx bridgeCore.Transaction, data []byte) *EthListenJob
type EthLog ¶
func (*EthLog) GetContractAddress ¶
func (*EthLog) GetTransactionHash ¶
func (*EthLog) GetTxIndex ¶
type EthTransaction ¶
type EthTransaction struct {
// contains filtered or unexported fields
}
func NewEthTransaction ¶
func NewEthTransaction(chainId *big.Int, tx *ethtypes.Transaction) (*EthTransaction, error)
func NewEthTransactionWithoutError ¶
func NewEthTransactionWithoutError(chainId *big.Int, tx *ethtypes.Transaction) *EthTransaction
func (*EthTransaction) GetData ¶
func (b *EthTransaction) GetData() []byte
func (*EthTransaction) GetFromAddress ¶
func (b *EthTransaction) GetFromAddress() string
func (*EthTransaction) GetHash ¶
func (b *EthTransaction) GetHash() common.Hash
func (*EthTransaction) GetToAddress ¶
func (b *EthTransaction) GetToAddress() string
func (*EthTransaction) GetValue ¶
func (b *EthTransaction) GetValue() *big.Int
type EthereumListener ¶
type EthereumListener struct {
// contains filtered or unexported fields
}
func NewEthereumListener ¶
func NewEthereumListener(ctx context.Context, cfg *bridgeCore.LsConfig, helpers utils.Utils, store stores.MainStore) (*EthereumListener, error)
func (*EthereumListener) AddListeners ¶
func (e *EthereumListener) AddListeners(m map[string]bridgeCore.Listener)
func (*EthereumListener) AddTask ¶
func (e *EthereumListener) AddTask(task bridgeCore.TaskHandler)
func (*EthereumListener) Close ¶
func (e *EthereumListener) Close()
func (*EthereumListener) Config ¶
func (e *EthereumListener) Config() *bridgeCore.LsConfig
func (*EthereumListener) Context ¶
func (e *EthereumListener) Context() context.Context
func (*EthereumListener) GetBlock ¶
func (e *EthereumListener) GetBlock(height uint64) (bridgeCore.Block, error)
func (*EthereumListener) GetBlockWithLogs ¶
func (e *EthereumListener) GetBlockWithLogs(height uint64) (bridgeCore.Block, error)
func (*EthereumListener) GetChainID ¶
func (e *EthereumListener) GetChainID() (*big.Int, error)
func (*EthereumListener) GetCurrentBlock ¶
func (e *EthereumListener) GetCurrentBlock() bridgeCore.Block
func (*EthereumListener) GetDecimals ¶
func (e *EthereumListener) GetDecimals() map[uint64]uint64
func (*EthereumListener) GetDomainSeparators ¶
func (e *EthereumListener) GetDomainSeparators() map[uint64]string
func (*EthereumListener) GetEthClient ¶
func (e *EthereumListener) GetEthClient() utils.EthClient
func (*EthereumListener) GetInitHeight ¶
func (e *EthereumListener) GetInitHeight() uint64
func (*EthereumListener) GetLatestBlock ¶
func (e *EthereumListener) GetLatestBlock() (bridgeCore.Block, error)
func (*EthereumListener) GetLatestBlockHeight ¶
func (e *EthereumListener) GetLatestBlockHeight() (uint64, error)
func (*EthereumListener) GetListenHandleJob ¶
func (e *EthereumListener) GetListenHandleJob(subscriptionName string, tx bridgeCore.Transaction, eventId string, data []byte) bridgeCore.JobHandler
func (*EthereumListener) GetListener ¶
func (e *EthereumListener) GetListener(s string) bridgeCore.Listener
func (*EthereumListener) GetName ¶
func (e *EthereumListener) GetName() string
func (*EthereumListener) GetPreventOmissionRange ¶
func (e *EthereumListener) GetPreventOmissionRange() uint64
func (*EthereumListener) GetProcessedBlock ¶
func (e *EthereumListener) GetProcessedBlock() (bridgeCore.Block, error)
func (*EthereumListener) GetReceipt ¶
func (*EthereumListener) GetSafeBlockRange ¶
func (e *EthereumListener) GetSafeBlockRange() uint64
func (*EthereumListener) GetScanUrls ¶ added in v0.0.10
func (e *EthereumListener) GetScanUrls() map[uint64]string
func (*EthereumListener) GetStore ¶
func (e *EthereumListener) GetStore() stores.MainStore
func (*EthereumListener) GetSubscriptions ¶
func (e *EthereumListener) GetSubscriptions() map[string]*bridgeCore.Subscribe
func (*EthereumListener) GetTask ¶
func (e *EthereumListener) GetTask(index int) bridgeCore.TaskHandler
func (*EthereumListener) GetTasks ¶
func (e *EthereumListener) GetTasks() []bridgeCore.TaskHandler
func (*EthereumListener) GetValidatorSign ¶
func (e *EthereumListener) GetValidatorSign() bridgeCoreUtils.ISign
func (*EthereumListener) IsDisabled ¶
func (e *EthereumListener) IsDisabled() bool
func (*EthereumListener) IsUpTodate ¶
func (e *EthereumListener) IsUpTodate() bool
func (*EthereumListener) NewJobFromDB ¶
func (e *EthereumListener) NewJobFromDB(job *bridgeCoreModels.Job) (bridgeCore.JobHandler, error)
func (*EthereumListener) Period ¶
func (e *EthereumListener) Period() time.Duration
func (*EthereumListener) SaveCurrentBlockToDB ¶
func (e *EthereumListener) SaveCurrentBlockToDB() error
func (*EthereumListener) SaveTransactionsToDB ¶
func (e *EthereumListener) SaveTransactionsToDB(txs []bridgeCore.Transaction) error
func (*EthereumListener) SendCallbackJobs ¶
func (e *EthereumListener) SendCallbackJobs(listeners map[string]bridgeCore.Listener, subscriptionName string, tx bridgeCore.Transaction, inputData []byte)
func (*EthereumListener) SetInitHeight ¶
func (e *EthereumListener) SetInitHeight(height uint64)
func (*EthereumListener) SetPrepareJobChan ¶
func (e *EthereumListener) SetPrepareJobChan(jobChan chan bridgeCore.JobHandler)
func (*EthereumListener) Start ¶
func (e *EthereumListener) Start()
func (*EthereumListener) UpdateCurrentBlock ¶
func (e *EthereumListener) UpdateCurrentBlock(block bridgeCore.Block) error
func (*EthereumListener) WithdrewDone2SlackCallback ¶
func (l *EthereumListener) WithdrewDone2SlackCallback(fromChainId *big.Int, tx bridgeCore.Transaction, data []byte) error
WithdrewDone2SlackCallback send the withdrew event rto slack channel through slack hook
type PolygonCallBackJob ¶
type PolygonCallBackJob struct {
*EthCallbackJob
}
type PolygonListener ¶
type PolygonListener struct { *EthereumListener // contains filtered or unexported fields }
func NewPolygonListener ¶
func NewPolygonListener(ctx context.Context, cfg *bridgeCore.LsConfig, helpers utils.Utils, store bridgeCoreStores.MainStore) (*PolygonListener, error)
func (*PolygonListener) NewJobFromDB ¶
func (l *PolygonListener) NewJobFromDB(job *bridgeCoreModels.Job) (bridgeCore.JobHandler, error)
func (*PolygonListener) WithdrewDone2SlackCallback ¶
func (l *PolygonListener) WithdrewDone2SlackCallback(fromChainId *big.Int, tx bridgeCore.Transaction, data []byte) error
WithdrewDone2SlackCallback send the withdrew event rto slack channel through slack hook
Click to show internal directories.
Click to hide internal directories.