v2

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 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 UniswapV2

type UniswapV2 struct {
	EthClient *ethclient.Client
	Factory   *Factory
}

func NewUniswap

func NewUniswap(ethClient *ethclient.Client, factory string) (*UniswapV2, error)

func (*UniswapV2) FilterPairCreated

func (u *UniswapV2) FilterPairCreated(fromBlock uint64, toBlock *uint64) ([]*entity.PairCreated, error)

func (*UniswapV2) Liquidity added in v0.1.3

func (u *UniswapV2) Liquidity(opts *bind.CallOpts, baseToken, quoteToken string) (*decimal.Decimal, *decimal.Decimal, error)

func (*UniswapV2) PairFor

func (u *UniswapV2) PairFor(baseToken, quoteToken string, feeRate ...int) (string, error)

func (*UniswapV2) SpotPrice

func (u *UniswapV2) SpotPrice(opts *bind.CallOpts, baseToken, quoteToken string, middleToken ...string) (*decimal.Decimal, error)

func (*UniswapV2) WatchPairCreated

func (u *UniswapV2) WatchPairCreated() (event.Subscription, chan *entity.PairCreated, error)

Jump to

Keyboard shortcuts

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