tokenprices

package
v0.0.0-...-5fc2af4 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTokensPrices

func GetTokensPrices(ctx context.Context, tokens map[string]types.Token, blockNumber int64) (map[string]map[string]decimal.Decimal, error)

Types

type Price

type Price struct {
	QuoteAsset string
	Value      decimal.Decimal
}

type Storable

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

func New

func New(block *types.Block, state *state.Manager) *Storable

func (*Storable) Execute

func (s *Storable) Execute(ctx context.Context) error

func (*Storable) ID

func (s *Storable) ID() string

func (*Storable) Result

func (s *Storable) Result() interface{}

func (*Storable) Rollback

func (s *Storable) Rollback(ctx context.Context, tx pgx.Tx) error

func (*Storable) SaveToDatabase

func (s *Storable) SaveToDatabase(ctx context.Context, tx pgx.Tx) error

Jump to

Keyboard shortcuts

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