eth

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAddresses

func AddAddresses(addrs []string)

func FetchSwapEvents

func FetchSwapEvents(poolAddress string, startTime, endTime int64) ([]types.Log, error)

func GetAddresses

func GetAddresses() []common.Address

func GetClient

func GetClient() *ethclient.Client

func GetNotifyChannel

func GetNotifyChannel() <-chan struct{}

func ListenToContractEvents

func ListenToContractEvents()

func ParseAddress

func ParseAddress(address string) string

func ProcessSwapInfos

func ProcessSwapInfos(task database.Task, swaps []SwapInfo, onboardingTask database.Task)

func RemoveAddresses

func RemoveAddresses(addrs []string)

Types

type SwapEvent

type SwapEvent struct {
	Amount0In  *big.Int
	Amount1In  *big.Int
	Amount0Out *big.Int
	Amount1Out *big.Int
}

type SwapInfo

type SwapInfo struct {
	Sender      string
	USDC        float64
	Timestamp   int64
	PoolAddress string
	TxHash      string
}

func ParseSwapEvents

func ParseSwapEvents(logs []types.Log) ([]SwapInfo, error)

Jump to

Keyboard shortcuts

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