liquidityscrapers

package
v1.4.1-rc-220 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: GPL-2.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 LiquidityScraper

type LiquidityScraper interface {
	Pool() chan dia.Pool
	Done() chan bool
}

func NewLiquidityScraper

func NewLiquidityScraper(source string) LiquidityScraper

NewLiquidityScraper returns a liquidity scraper for @source.

type UniswapPair

type UniswapPair struct {
	Token0      dia.Asset
	Token1      dia.Asset
	ForeignName string
	Address     common.Address
}

type UniswapScraper

type UniswapScraper struct {
	RestClient *ethclient.Client
	// contains filtered or unexported fields
}

func NewUniswapScraper

func NewUniswapScraper(exchange dia.Exchange) (us *UniswapScraper)

func (*UniswapScraper) Done

func (us *UniswapScraper) Done() chan bool

func (*UniswapScraper) GetDecimals

func (us *UniswapScraper) GetDecimals(tokenAddress common.Address) (decimals uint8, err error)

GetDecimals returns the decimals of the token with address @tokenAddress

func (*UniswapScraper) GetName

func (us *UniswapScraper) GetName(tokenAddress common.Address) (name string, err error)

func (*UniswapScraper) GetPoolByAddress

func (us *UniswapScraper) GetPoolByAddress(pairAddress common.Address) (pool dia.Pool, err error)

func (*UniswapScraper) GetPoolByID

func (us *UniswapScraper) GetPoolByID(num int64) (dia.Pool, error)

GetPoolByID returns the Uniswap Pool with the integer id @num.

func (*UniswapScraper) Pool

func (us *UniswapScraper) Pool() chan dia.Pool

Jump to

Keyboard shortcuts

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