source

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2021 License: GPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJSONReader

func NewJSONReader(path string, filename string) *jsonReader

Types

type AssetSource

type AssetSource interface {
	Asset() chan dia.Asset
}

type Assets

type Assets struct {
	Assets []dia.Asset `json:"Assets"`
}

type SerumAssetSource

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

func NewSerumAssetSource

func NewSerumAssetSource(exchange dia.Exchange) *SerumAssetSource

func (*SerumAssetSource) Asset

func (sas *SerumAssetSource) Asset() chan dia.Asset

type SerumPair

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

type UniswapAssetSource

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

func NewUniswapAssetSource

func NewUniswapAssetSource(exchange dia.Exchange) *UniswapAssetSource

func (*UniswapAssetSource) Asset

func (uas *UniswapAssetSource) Asset() chan dia.Asset

func (*UniswapAssetSource) GetDecimals

func (uas *UniswapAssetSource) GetDecimals(tokenAddress common.Address) (decimals uint8, err error)

GetDecimals returns the decimals of the token with address @tokenAddress

func (*UniswapAssetSource) GetName

func (uas *UniswapAssetSource) GetName(tokenAddress common.Address) (name string, err error)

func (*UniswapAssetSource) GetPairByAddress

func (uas *UniswapAssetSource) GetPairByAddress(pairAddress common.Address) (pair UniswapPair, err error)

func (*UniswapAssetSource) GetPairByID

func (uas *UniswapAssetSource) GetPairByID(num int64) (UniswapPair, error)

GetPairByID returns the UniswapPair with the integer id @num

type UniswapPair

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

Jump to

Keyboard shortcuts

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