types

package
v0.0.0-...-3f0f60f Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainService

type ChainService interface {
	Service

	SendTx(ctx context.Context, from, to string, amount *big.Int, balanceCheck bool) error
}

type ChainSet

type ChainSet[I any, C ChainService] interface {
	Service

	Chain(ctx context.Context, id I) (C, error)

	ChainStatus(ctx context.Context, id string) (ChainStatus, error)
	ChainStatuses(ctx context.Context, offset, limit int) (chains []ChainStatus, count int, err error)

	NodeStatuses(ctx context.Context, offset, limit int, chainIDs ...string) (nodes []NodeStatus, count int, err error)

	SendTx(ctx context.Context, chainID, from, to string, amount *big.Int, balanceCheck bool) error
}

type ChainStatus

type ChainStatus struct {
	ID      string
	Enabled bool
	Config  string // TOML
}

type ConfigProvider

type ConfigProvider interface {
	Service
	OffchainConfigDigester() ocrtypes.OffchainConfigDigester
	ContractConfigTracker() ocrtypes.ContractConfigTracker
}

The bootstrap jobs only watch config.

type MedianProvider

type MedianProvider interface {
	PluginProvider
	ReportCodec() median.ReportCodec
	MedianContract() median.MedianContract
	OnchainConfigCodec() median.OnchainConfigCodec
}

MedianProvider provides all components needed for a median OCR2 plugin.

type MercuryProvider

type MercuryProvider interface {
	ConfigProvider
	ReportCodec() mercury.ReportCodec
	OnchainConfigCodec() mercury.OnchainConfigCodec
	ContractTransmitter() mercury.Transmitter
}

MercuryProvider provides components needed for a mercury OCR2 plugin. Mercury requires config tracking but does not transmit on-chain.

type NodeStatus

type NodeStatus struct {
	ChainID string
	Name    string
	Config  string // TOML
	State   string
}

type Plugin

type Plugin = PluginProvider

Plugin is an alias for PluginProvider, for compatibility. Deprecated

type PluginArgs

type PluginArgs struct {
	TransmitterID string
	PluginConfig  []byte
}

PluginArgs are the args required to create any OCR2 plugin components. Its possible that the plugin config might actually be different per relay type, so we pass the config directly through.

type PluginProvider

type PluginProvider interface {
	ConfigProvider
	ContractTransmitter() ocrtypes.ContractTransmitter
}

PluginProvider provides common components for any OCR2 plugin. It watches config and is able to transmit.

type RelayArgs

type RelayArgs struct {
	ExternalJobID uuid.UUID
	JobID         int32
	ContractID    string
	New           bool // Whether this is a first time job add.
	RelayConfig   []byte
}

type Relayer

type Relayer interface {
	Service
	NewConfigProvider(rargs RelayArgs) (ConfigProvider, error)
	NewMedianProvider(rargs RelayArgs, pargs PluginArgs) (MedianProvider, error)
	NewMercuryProvider(rargs RelayArgs, pargs PluginArgs) (MercuryProvider, error)
}

type Service

type Service interface {
	Name() string
	Start(context.Context) error
	Close() error
	Ready() error
	HealthReport() map[string]error
}

Jump to

Keyboard shortcuts

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