price_feeds

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2019 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoMatchingLog = errors.New("no matching log")
	Ether            = big.NewFloat(1e18)
	Ray              = big.NewFloat(1e27)
)

Functions

func Convert

func Convert(conversion string, value string, prec int) string

func GetPriceFeedConfig

func GetPriceFeedConfig() shared_t.TransformerConfig

Types

type LogValueEntity

type LogValueEntity struct {
	Val common.Address
}

type PriceFeedConverter

type PriceFeedConverter struct{}

func (PriceFeedConverter) ToModels

func (converter PriceFeedConverter) ToModels(ethLogs []types.Log) ([]interface{}, error)

type PriceFeedModel

type PriceFeedModel struct {
	BlockNumber       uint64 `db:"block_number"`
	MedianizerAddress string `db:"medianizer_address"`
	UsdValue          string `db:"usd_value"`
	LogIndex          uint   `db:"log_idx"`
	TransactionIndex  uint   `db:"tx_idx"`
	Raw               []byte `db:"raw_log"`
}

type PriceFeedRepository

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

func (PriceFeedRepository) Create

func (repository PriceFeedRepository) Create(headerID int64, models []interface{}) error

func (PriceFeedRepository) MarkHeaderChecked

func (repository PriceFeedRepository) MarkHeaderChecked(headerID int64) error

func (PriceFeedRepository) MissingHeaders

func (repository PriceFeedRepository) MissingHeaders(startingBlockNumber, endingBlockNumber int64) ([]core.Header, error)

func (PriceFeedRepository) RecheckHeaders

func (repository PriceFeedRepository) RecheckHeaders(startingBlockNumber, endingBlockNumber int64) ([]core.Header, error)

func (*PriceFeedRepository) SetDB

func (repository *PriceFeedRepository) SetDB(db *postgres.DB)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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