pancake

package
v0.0.0-...-dee77e4 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RouterAddress = "0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F"

	Name = "pancake"
)

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(client *ethclient.Client, address string) (exchanges.Router, error)

func NewRouterWithName

func NewRouterWithName(client *ethclient.Client, address string, routerName string) (exchanges.Router, error)

Types

type Router

type Router struct {
	// contains filtered or unexported fields
}

func (Router) Client

func (r Router) Client() *ethclient.Client

func (Router) GetAllPairs

func (r Router) GetAllPairs(ctx context.Context) ([]common.Address, error)

func (Router) GetAllPairsAsync

func (r Router) GetAllPairsAsync(ctx context.Context) (int64, chan *common.Address, chan error)

func (Router) GetFactoryAddress

func (r Router) GetFactoryAddress() common.Address

func (Router) GetPairInfo

func (r Router) GetPairInfo(address common.Address) (*models.LiquidityPool, error)

func (Router) GetPairPrice

func (r Router) GetPairPrice(address common.Address, token0Amount int64, token1Amount int64) (*exchanges.TradeInfo, error)

func (Router) GetReserves

func (r Router) GetReserves(address common.Address) (float64, float64, error)

func (Router) GetRouterAddress

func (r Router) GetRouterAddress() common.Address

func (Router) GetRouterContract

func (r Router) GetRouterContract() exchanges.RouterContract

func (Router) Name

func (r Router) Name() string

Directories

Path Synopsis
contracts

Jump to

Keyboard shortcuts

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