v2

package
v2.1.1-beta0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// DefaultIDs is the set of chain ids which have defaults.
	DefaultIDs []*utils.Big
)

Functions

func ChainTypeForID

func ChainTypeForID(chainID *utils.Big) (config.ChainType, bool)

Types

type Automation

type Automation struct {
	GasLimit *uint32
}

type BalanceMonitor

type BalanceMonitor struct {
	Enabled *bool
}

type BlockHistoryEstimator

type BlockHistoryEstimator struct {
	BatchSize                 *uint32
	BlockHistorySize          *uint16
	CheckInclusionBlocks      *uint16
	CheckInclusionPercentile  *uint16
	EIP1559FeeCapBufferBlocks *uint16
	TransactionPercentile     *uint16
}

type Chain

type Chain struct {
	AutoCreateKey            *bool
	BlockBackfillDepth       *uint32
	BlockBackfillSkip        *bool
	ChainType                *string
	FinalityDepth            *uint32
	FlagsContractAddress     *ethkey.EIP55Address
	LinkContractAddress      *ethkey.EIP55Address
	LogBackfillBatchSize     *uint32
	LogPollInterval          *models.Duration
	LogKeepBlocksDepth       *uint32
	MinIncomingConfirmations *uint32
	MinContractPayment       *assets.Link
	NonceAutoSync            *bool
	NoNewHeadsThreshold      *models.Duration
	OperatorFactoryAddress   *ethkey.EIP55Address
	RPCDefaultBatchSize      *uint32
	RPCBlockQueryDelay       *uint16

	Transactions   Transactions      `toml:",omitempty"`
	BalanceMonitor BalanceMonitor    `toml:",omitempty"`
	GasEstimator   GasEstimator      `toml:",omitempty"`
	HeadTracker    HeadTracker       `toml:",omitempty"`
	KeySpecific    KeySpecificConfig `toml:",omitempty"`
	NodePool       NodePool          `toml:",omitempty"`
	OCR            OCR               `toml:",omitempty"`
	OCR2           OCR2              `toml:",omitempty"`
}

func Defaults

func Defaults(chainID *utils.Big, with ...*Chain) Chain

Defaults returns a Chain based on the defaults for chainID and fields from with, applied in order so later Chains override earlier ones.

func DefaultsNamed

func DefaultsNamed(chainID *utils.Big) (c Chain, name string)

DefaultsNamed returns the default Chain values, optionally for the given chainID, as well as a name if the chainID is known.

func (*Chain) SetFrom

func (c *Chain) SetFrom(f *Chain)

SetFrom updates c with any non-nil values from f.

func (*Chain) ValidateConfig

func (c *Chain) ValidateConfig() (err error)

type ChainScoped

type ChainScoped struct {
	gencfg.BasicConfig
	// contains filtered or unexported fields
}

ChainScoped implements config.ChainScopedConfig with a gencfg.BasicConfig and EVMConfig.

func NewTOMLChainScopedConfig

func NewTOMLChainScopedConfig(genCfg gencfg.BasicConfig, chain *EVMConfig, lggr logger.Logger) *ChainScoped

func (*ChainScoped) AutoCreateKey

func (c *ChainScoped) AutoCreateKey() bool

func (*ChainScoped) BalanceMonitorEnabled

func (c *ChainScoped) BalanceMonitorEnabled() bool

func (*ChainScoped) BlockBackfillDepth

func (c *ChainScoped) BlockBackfillDepth() uint64

func (*ChainScoped) BlockBackfillSkip

func (c *ChainScoped) BlockBackfillSkip() bool

func (*ChainScoped) BlockEmissionIdleWarningThreshold

func (c *ChainScoped) BlockEmissionIdleWarningThreshold() time.Duration

func (*ChainScoped) BlockHistoryEstimatorBatchSize

func (c *ChainScoped) BlockHistoryEstimatorBatchSize() (size uint32)

func (*ChainScoped) BlockHistoryEstimatorBlockDelay

func (c *ChainScoped) BlockHistoryEstimatorBlockDelay() uint16

func (*ChainScoped) BlockHistoryEstimatorBlockHistorySize

func (c *ChainScoped) BlockHistoryEstimatorBlockHistorySize() uint16

func (*ChainScoped) BlockHistoryEstimatorCheckInclusionBlocks

func (c *ChainScoped) BlockHistoryEstimatorCheckInclusionBlocks() uint16

func (*ChainScoped) BlockHistoryEstimatorCheckInclusionPercentile

func (c *ChainScoped) BlockHistoryEstimatorCheckInclusionPercentile() uint16

func (*ChainScoped) BlockHistoryEstimatorEIP1559FeeCapBufferBlocks

func (c *ChainScoped) BlockHistoryEstimatorEIP1559FeeCapBufferBlocks() uint16

func (*ChainScoped) BlockHistoryEstimatorTransactionPercentile

func (c *ChainScoped) BlockHistoryEstimatorTransactionPercentile() uint16

func (*ChainScoped) ChainID

func (c *ChainScoped) ChainID() *big.Int

func (*ChainScoped) ChainType

func (c *ChainScoped) ChainType() gencfg.ChainType

func (*ChainScoped) EthTxReaperInterval

func (c *ChainScoped) EthTxReaperInterval() time.Duration

func (*ChainScoped) EthTxReaperThreshold

func (c *ChainScoped) EthTxReaperThreshold() time.Duration

func (*ChainScoped) EthTxResendAfterThreshold

func (c *ChainScoped) EthTxResendAfterThreshold() time.Duration

func (*ChainScoped) EvmEIP1559DynamicFees

func (c *ChainScoped) EvmEIP1559DynamicFees() bool

func (*ChainScoped) EvmFinalityDepth

func (c *ChainScoped) EvmFinalityDepth() uint32

func (*ChainScoped) EvmGasBumpPercent

func (c *ChainScoped) EvmGasBumpPercent() uint16

func (*ChainScoped) EvmGasBumpThreshold

func (c *ChainScoped) EvmGasBumpThreshold() uint64

func (*ChainScoped) EvmGasBumpTxDepth

func (c *ChainScoped) EvmGasBumpTxDepth() uint16

func (*ChainScoped) EvmGasBumpWei

func (c *ChainScoped) EvmGasBumpWei() *assets.Wei

func (*ChainScoped) EvmGasFeeCapDefault

func (c *ChainScoped) EvmGasFeeCapDefault() *assets.Wei

func (*ChainScoped) EvmGasLimitDRJobType

func (c *ChainScoped) EvmGasLimitDRJobType() *uint32

func (*ChainScoped) EvmGasLimitDefault

func (c *ChainScoped) EvmGasLimitDefault() uint32

func (*ChainScoped) EvmGasLimitFMJobType

func (c *ChainScoped) EvmGasLimitFMJobType() *uint32

func (*ChainScoped) EvmGasLimitKeeperJobType

func (c *ChainScoped) EvmGasLimitKeeperJobType() *uint32

func (*ChainScoped) EvmGasLimitMax

func (c *ChainScoped) EvmGasLimitMax() uint32

func (*ChainScoped) EvmGasLimitMultiplier

func (c *ChainScoped) EvmGasLimitMultiplier() float32

func (*ChainScoped) EvmGasLimitOCRJobType

func (c *ChainScoped) EvmGasLimitOCRJobType() *uint32

func (*ChainScoped) EvmGasLimitTransfer

func (c *ChainScoped) EvmGasLimitTransfer() uint32

func (*ChainScoped) EvmGasLimitVRFJobType

func (c *ChainScoped) EvmGasLimitVRFJobType() *uint32

func (*ChainScoped) EvmGasPriceDefault

func (c *ChainScoped) EvmGasPriceDefault() *assets.Wei

func (*ChainScoped) EvmGasTipCapDefault

func (c *ChainScoped) EvmGasTipCapDefault() *assets.Wei

func (*ChainScoped) EvmGasTipCapMinimum

func (c *ChainScoped) EvmGasTipCapMinimum() *assets.Wei

func (*ChainScoped) EvmHeadTrackerHistoryDepth

func (c *ChainScoped) EvmHeadTrackerHistoryDepth() uint32

func (*ChainScoped) EvmHeadTrackerMaxBufferSize

func (c *ChainScoped) EvmHeadTrackerMaxBufferSize() uint32

func (*ChainScoped) EvmHeadTrackerSamplingInterval

func (c *ChainScoped) EvmHeadTrackerSamplingInterval() time.Duration

func (*ChainScoped) EvmLogBackfillBatchSize

func (c *ChainScoped) EvmLogBackfillBatchSize() uint32

func (*ChainScoped) EvmLogKeepBlocksDepth

func (c *ChainScoped) EvmLogKeepBlocksDepth() uint32

func (*ChainScoped) EvmLogPollInterval

func (c *ChainScoped) EvmLogPollInterval() time.Duration

func (*ChainScoped) EvmMaxGasPriceWei

func (c *ChainScoped) EvmMaxGasPriceWei() *assets.Wei

func (*ChainScoped) EvmMaxInFlightTransactions

func (c *ChainScoped) EvmMaxInFlightTransactions() uint32

func (*ChainScoped) EvmMaxQueuedTransactions

func (c *ChainScoped) EvmMaxQueuedTransactions() uint64

func (*ChainScoped) EvmMinGasPriceWei

func (c *ChainScoped) EvmMinGasPriceWei() *assets.Wei

func (*ChainScoped) EvmNonceAutoSync

func (c *ChainScoped) EvmNonceAutoSync() bool

func (*ChainScoped) EvmRPCDefaultBatchSize

func (c *ChainScoped) EvmRPCDefaultBatchSize() uint32

func (*ChainScoped) EvmUseForwarders

func (c *ChainScoped) EvmUseForwarders() bool

func (*ChainScoped) FlagsContractAddress

func (c *ChainScoped) FlagsContractAddress() string

func (*ChainScoped) GasEstimatorMode

func (c *ChainScoped) GasEstimatorMode() string

func (*ChainScoped) KeySpecificMaxGasPriceWei

func (c *ChainScoped) KeySpecificMaxGasPriceWei(addr common.Address) *assets.Wei

func (*ChainScoped) LinkContractAddress

func (c *ChainScoped) LinkContractAddress() string

func (*ChainScoped) MinIncomingConfirmations

func (c *ChainScoped) MinIncomingConfirmations() uint32

func (*ChainScoped) MinimumContractPayment

func (c *ChainScoped) MinimumContractPayment() *assets.Link

func (*ChainScoped) NodeNoNewHeadsThreshold

func (c *ChainScoped) NodeNoNewHeadsThreshold() time.Duration

func (*ChainScoped) NodePollFailureThreshold

func (c *ChainScoped) NodePollFailureThreshold() uint32

func (*ChainScoped) NodePollInterval

func (c *ChainScoped) NodePollInterval() time.Duration

func (*ChainScoped) NodeSelectionMode

func (c *ChainScoped) NodeSelectionMode() string

func (*ChainScoped) NodeSyncThreshold

func (c *ChainScoped) NodeSyncThreshold() uint32

func (*ChainScoped) OCR2AutomationGasLimit

func (c *ChainScoped) OCR2AutomationGasLimit() uint32

func (*ChainScoped) OCRContractConfirmations

func (c *ChainScoped) OCRContractConfirmations() uint16

func (*ChainScoped) OCRContractTransmitterTransmitTimeout

func (c *ChainScoped) OCRContractTransmitterTransmitTimeout() time.Duration

func (*ChainScoped) OCRDatabaseTimeout

func (c *ChainScoped) OCRDatabaseTimeout() time.Duration

func (*ChainScoped) OCRObservationGracePeriod

func (c *ChainScoped) OCRObservationGracePeriod() time.Duration

func (*ChainScoped) OperatorFactoryAddress

func (c *ChainScoped) OperatorFactoryAddress() string

func (*ChainScoped) Validate

func (c *ChainScoped) Validate() (err error)

type EVMConfig

type EVMConfig struct {
	ChainID *utils.Big
	Enabled *bool
	Chain
	Nodes EVMNodes
}

func (*EVMConfig) IsEnabled

func (c *EVMConfig) IsEnabled() bool

func (*EVMConfig) SetFrom

func (c *EVMConfig) SetFrom(f *EVMConfig)

func (*EVMConfig) TOMLString

func (c *EVMConfig) TOMLString() (string, error)

func (*EVMConfig) ValidateConfig

func (c *EVMConfig) ValidateConfig() (err error)

type EVMConfigs

type EVMConfigs []*EVMConfig

func (EVMConfigs) Chains

func (cs EVMConfigs) Chains(ids ...string) (r []relaytypes.ChainStatus, err error)

func (EVMConfigs) Node

func (cs EVMConfigs) Node(name string) (types.Node, error)

func (EVMConfigs) NodeStatus added in v2.1.0

func (cs EVMConfigs) NodeStatus(name string) (relaytypes.NodeStatus, error)

func (EVMConfigs) NodeStatuses added in v2.1.0

func (cs EVMConfigs) NodeStatuses(chainIDs ...string) (ns []relaytypes.NodeStatus, err error)

func (EVMConfigs) Nodes

func (cs EVMConfigs) Nodes(chainID utils.Big) (ns []types.Node, err error)

func (*EVMConfigs) SetFrom

func (cs *EVMConfigs) SetFrom(fs *EVMConfigs)

func (EVMConfigs) ValidateConfig

func (cs EVMConfigs) ValidateConfig() (err error)

type EVMNodes

type EVMNodes []*Node

func (*EVMNodes) SetFrom

func (ns *EVMNodes) SetFrom(fs *EVMNodes)

type GasEstimator

type GasEstimator struct {
	Mode *string

	PriceDefault *assets.Wei
	PriceMax     *assets.Wei
	PriceMin     *assets.Wei

	LimitDefault    *uint32
	LimitMax        *uint32
	LimitMultiplier *decimal.Decimal
	LimitTransfer   *uint32
	LimitJobType    GasLimitJobType `toml:",omitempty"`

	BumpMin       *assets.Wei
	BumpPercent   *uint16
	BumpThreshold *uint32
	BumpTxDepth   *uint16

	EIP1559DynamicFees *bool

	FeeCapDefault *assets.Wei
	TipCapDefault *assets.Wei
	TipCapMin     *assets.Wei

	BlockHistory BlockHistoryEstimator `toml:",omitempty"`
}

func (*GasEstimator) ValidateConfig

func (e *GasEstimator) ValidateConfig() (err error)

type GasLimitJobType

type GasLimitJobType struct {
	OCR    *uint32 `toml:",inline"`
	DR     *uint32 `toml:",inline"`
	VRF    *uint32 `toml:",inline"`
	FM     *uint32 `toml:",inline"`
	Keeper *uint32 `toml:",inline"`
}

type HasEVMConfigs

type HasEVMConfigs interface {
	EVMConfigs() EVMConfigs
}

type HeadTracker

type HeadTracker struct {
	HistoryDepth     *uint32
	MaxBufferSize    *uint32
	SamplingInterval *models.Duration
}

type KeySpecific

type KeySpecific struct {
	Key          *ethkey.EIP55Address
	GasEstimator KeySpecificGasEstimator `toml:",omitempty"`
}

type KeySpecificConfig

type KeySpecificConfig []KeySpecific

func (KeySpecificConfig) ValidateConfig

func (ks KeySpecificConfig) ValidateConfig() (err error)

type KeySpecificGasEstimator

type KeySpecificGasEstimator struct {
	PriceMax *assets.Wei
}

type Node

type Node struct {
	Name     *string
	WSURL    *models.URL
	HTTPURL  *models.URL
	SendOnly *bool
}

func (*Node) SetFrom

func (n *Node) SetFrom(f *Node)

func (*Node) ValidateConfig

func (n *Node) ValidateConfig() (err error)

type NodePool

type NodePool struct {
	PollFailureThreshold *uint32
	PollInterval         *models.Duration
	SelectionMode        *string
	SyncThreshold        *uint32
}

type OCR

type OCR struct {
	ContractConfirmations              *uint16
	ContractTransmitterTransmitTimeout *models.Duration
	DatabaseTimeout                    *models.Duration
	ObservationGracePeriod             *models.Duration
}

type OCR2

type OCR2 struct {
	Automation Automation `toml:",omitempty"`
}

type Transactions

type Transactions struct {
	ForwardersEnabled    *bool
	MaxInFlight          *uint32
	MaxQueued            *uint32
	ReaperInterval       *models.Duration
	ReaperThreshold      *models.Duration
	ResendAfterThreshold *models.Duration
}

Jump to

Keyboard shortcuts

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