priceprovider

package
v0.1.4-RC7 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2023 License: AGPL-3.0, AGPL-3.0-or-later Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// URL is Ethereum network url, if type is uniswap
	URL string `mapstructure:"URL"`

	// Type is price getter type
	Type Type `mapstructure:"Type"`
}

Config represents the configuration of the pricegetter

type PriceProvider

type PriceProvider interface {
	// GetEthToMaticPrice getting price from the specified provider
	GetEthToMaticPrice(ctx context.Context) (*big.Float, error)
}

PriceProvider get price from different data sources

type Type

type Type string

Type for the price provider

const (
	// UniswapType for uniswap price provider
	UniswapType Type = "uniswap"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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