eth

package
v0.12.0-dev.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStorageQueryFailed = errors.New("oracle contract storage query failed")

Functions

This section is empty.

Types

type Median

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

Median implements the oracle.Median interface using github.com/defiweb/go-eth packages.

func NewMedian

func NewMedian(rpc rpc.RPC, address types.Address) *Median

NewMedian creates the new Median instance.

func (*Median) Address

func (m *Median) Address() types.Address

Address implements the oracle.Median interface.

func (*Median) Age

func (m *Median) Age(ctx context.Context) (time.Time, error)

Age implements the oracle.Median interface.

func (*Median) Bar

func (m *Median) Bar(ctx context.Context) (int64, error)

Bar implements the oracle.Median interface.

func (*Median) Drop

func (m *Median) Drop(ctx context.Context, addresses []types.Address, simulateBeforeRun bool) (*types.Hash, error)

Drop implements the oracle.Median interface.

func (*Median) Feeds

func (m *Median) Feeds(ctx context.Context) ([]types.Address, error)

Feeds implements the oracle.Median interface.

func (*Median) Lift

func (m *Median) Lift(ctx context.Context, addresses []types.Address, simulateBeforeRun bool) (*types.Hash, error)

Lift implements the oracle.Median interface.

func (*Median) Poke

func (m *Median) Poke(ctx context.Context, prices []*median.Price, simulateBeforeRun bool) (*types.Hash, error)

Poke implements the oracle.Median interface.

func (*Median) SetBar

func (m *Median) SetBar(ctx context.Context, bar *big.Int, simulateBeforeRun bool) (*types.Hash, error)

SetBar implements the oracle.Median interface.

func (*Median) Val

func (m *Median) Val(ctx context.Context) (*big.Int, error)

Val implements the oracle.Median interface.

func (*Median) Wat

func (m *Median) Wat(ctx context.Context) (string, error)

Wat implements the oracle.Median interface.

Jump to

Keyboard shortcuts

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