uniswap

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IUniswap

type IUniswap interface {
	// SpotPrice returns the price of baseToken/quoteToken, it indicates how much of the quote token is needed to purchase one unit of the base token.
	SpotPrice(opts *bind.CallOpts, baseToken, quoteToken string, middleToken ...string) (*decimal.Decimal, error)
	// PairFor returns the pair address of baseToken and quoteToken.
	PairFor(baseToken, quoteToken string, feeRate ...int) (string, error)
	// WatchPairCreated watches the event of PairCreated.
	WatchPairCreated() (event.Subscription, chan *entity.PairCreated, error)
	// FilterPairCreated returns the event of PairCreated with block range.
	FilterPairCreated(fromBlock uint64, toBlock *uint64) ([]*entity.PairCreated, error)
	// Liquidity returns the liquidity of the pair.
	Liquidity(opts *bind.CallOpts, baseToken, quoteToken string) (*decimal.Decimal, *decimal.Decimal, error)
}

func NewUniswap

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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