filterdeposit

package
v0.0.0-...-2da98db Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EvmMaxRangeFlag   = "evm-max-range"
	EvmStartBlockFlag = "evm-start-block"
)
View Source
const (
	BTCChainIDFlag = "btc-chain-id"
)

Variables

This section is empty.

Functions

func CheckEvmTxLog

func CheckEvmTxLog(vLog *ethtypes.Log, wantAddress common.Address, wantHash string, wantTopics int) error

CheckEvmTxLog is a helper function used to validate receipts, logic is taken from zetaclient.

func FilterBTCTransactions

func FilterBTCTransactions(cmd *cobra.Command, _ []string) error

FilterBTCTransactions is a command that queries the bitcoin explorer for inbound transactions that qualify for cross chain transactions.

func FilterEVMTransactions

func FilterEVMTransactions(cmd *cobra.Command, _ []string) error

FilterEVMTransactions is a command that queries an EVM explorer and Contracts for inbound transactions that qualify for cross chain transactions.

func GetTssAddress

func GetTssAddress(cfg *config.Config, btcChainID string) (*types.QueryGetTssAddressResponse, error)

func NewBtcCmd

func NewBtcCmd() *cobra.Command

func NewEvmCmd

func NewEvmCmd() *cobra.Command

func NewFilterDepositCmd

func NewFilterDepositCmd() *cobra.Command

Types

type Deposit

type Deposit struct {
	TxID   string
	Amount uint64
}

Deposit is a data structure for keeping track of inbound transactions

func CheckForCCTX

func CheckForCCTX(list []Deposit, cfg *config.Config) ([]Deposit, error)

CheckForCCTX is querying zetacore for a cctx associated with a confirmed transaction hash. If the cctx is not found, then the transaction hash is added to the list of missed inbound transactions.

func GetEthHashList

func GetEthHashList(cfg *config.Config, tssAddress string, startBlock uint64, blockRange uint64) ([]Deposit, error)

GetEthHashList is a helper function querying total inbound txns by segments of blocks in ranges defined by the config

func GetHashListSegment

func GetHashListSegment(
	client *ethclient.Client,
	startBlock uint64,
	endBlock uint64,
	tssAddress string,
	cfg *config.Config) ([]Deposit, error)

GetHashListSegment queries and filters deposits for a given range

Jump to

Keyboard shortcuts

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