orchestrator

package
v0.1.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetMinBatchFee

func SetMinBatchFee(minFee float64) func(PeggyOrchestrator)

SetMinBatchFee sets the (optional) minimum batch fee denominated in USD.

func SetPriceFeeder

func SetPriceFeeder(pf *coingecko.PriceFeed) func(PeggyOrchestrator)

SetPriceFeeder sets the (optional) price feeder used when performing profitable batch calculations. Note, this should be supplied only when the min batch fee is non-zero.

Types

type PeggyOrchestrator

type PeggyOrchestrator interface {
	Start(ctx context.Context) error
	CheckForEvents(ctx context.Context, startingBlock uint64) (currentBlock uint64, err error)
	GetLastCheckedBlock(ctx context.Context) (uint64, error)
	EthOracleMainLoop(ctx context.Context) error
	EthSignerMainLoop(ctx context.Context) error
	BatchRequesterLoop(ctx context.Context) error
	RelayerMainLoop(ctx context.Context) error

	SetMinBatchFee(float64)
	SetPriceFeeder(*coingecko.PriceFeed)
}

func NewPeggyOrchestrator

func NewPeggyOrchestrator(
	logger zerolog.Logger,
	cosmosQueryClient sidechain.PeggyQueryClient,
	peggyBroadcastClient sidechain.PeggyBroadcastClient,
	tmClient tmclient.TendermintClient,
	peggyContract peggy.Contract,
	ethFrom ethcmn.Address,
	ethSignerFn keystore.SignerFn,
	ethPersonalSignFn keystore.PersonalSignFn,
	relayer relayer.PeggyRelayer,
	loopDuration time.Duration,
	cosmosBlockTime time.Duration,
	options ...func(PeggyOrchestrator),
) PeggyOrchestrator

Directories

Path Synopsis
ethereum

Jump to

Keyboard shortcuts

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