priceoracle

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2021 License: BSD-3-Clause Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverPriceOracleAddress

func DiscoverPriceOracleAddress(chainID int64) (priceOracleAddress common.Address, found bool)

DiscoverPriceOracleAddress returns the canonical price oracle for this chainID

Types

type Service

type Service interface {
	io.Closer
	// CurrentRates returns the current value of exchange rate and deduction
	// according to the latest information from oracle
	CurrentRates() (exchangeRate *big.Int, deduction *big.Int, err error)
	// GetPrice retrieves latest available information from oracle
	GetPrice(ctx context.Context) (*big.Int, *big.Int, error)
	Start()
}

func New

func New(logger logging.Logger, priceOracleAddress common.Address, transactionService transaction.Service, timeDivisor int64) Service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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