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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.