oracle

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAddressBalanceOracle

func NewAddressBalanceOracle(ctx context.Context, cfg *core.ClientConfig,
	opts ...component.Option) (component.Component, error)

NewAddressBalanceOracle ... Initializer for address.balance oracle component

func NewGethBlockOracle

func NewGethBlockOracle(ctx context.Context, cfg *core.ClientConfig,
	opts ...component.Option) (component.Component, error)

NewGethBlockOracle ... Initializer for geth.block oracle component

Types

type AddressBalanceODef

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

TODO(#21): Verify config validity during Oracle construction AddressBalanceODef ... Address register oracle definition used to drive oracle component

func NewAddressBalanceODef

func NewAddressBalanceODef(cfg *core.ClientConfig, client client.EthClient,
	h *big.Int) *AddressBalanceODef

NewAddressBalanceODef ... Initializer for address.balance oracle definition

func (*AddressBalanceODef) BackTestRoutine

func (oracle *AddressBalanceODef) BackTestRoutine(_ context.Context, _ chan core.TransitData,
	_ *big.Int, _ *big.Int) error

BackTestRoutine ... NOTE - This oracle does not support backtesting TODO (#59) : Add account balance backtesting support

func (*AddressBalanceODef) ReadRoutine

func (oracle *AddressBalanceODef) ReadRoutine(ctx context.Context, componentChan chan core.TransitData) error

ReadRoutine ... Sequentially polls go-ethereum compatible execution client for address (EOA, Contract) native balance amounts

type GethBlockODef

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

TODO(#21): Verify config validity during Oracle construction GethBlockODef ...GethBlock register oracle definition used to drive oracle component

func NewGethBlockODef

func NewGethBlockODef(cfg *core.ClientConfig, client client.EthClient,
	h *big.Int, stats metrics.Metricer) *GethBlockODef

NewGethBlockODef ... Initializer for geth.block oracle definition

func (*GethBlockODef) BackTestRoutine

func (oracle *GethBlockODef) BackTestRoutine(ctx context.Context, componentChan chan core.TransitData,
	startHeight *big.Int, endHeight *big.Int) error

BackTestRoutine ...

func (*GethBlockODef) ReadRoutine

func (oracle *GethBlockODef) ReadRoutine(ctx context.Context, componentChan chan core.TransitData) error

ReadRoutine ... Sequentially polls go-ethereum compatible execution client using monotonic block height variable for block metadata & writes block metadata to output listener components

Jump to

Keyboard shortcuts

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