Documentation ¶
Index ¶
- Constants
- Variables
- func AccountToAddress(accounts []types.Account) (addresses []common.Address, err error)
- func AddEntries(defs map[string]types.CodecEntry, modByTypeName map[string]codec.Modifier) error
- func ConfirmationsFromConfig(values map[string]int) (map[primitives.ConfidenceLevel]evmtypes.Confirmations, error)
- func FilterNamesFromRelayArgs(args commontypes.RelayArgs) (filterNames []string, err error)
- func IsLaterThan(incoming gethTypes.Log, existing gethTypes.Log) bool
- func NewChainReader(h httypes.HeadTracker) mercurytypes.ChainReader
- func NewCodec(conf types.CodecConfig) (commontypes.RemoteCodec, error)
- func NewConfigPoller(ctx context.Context, lggr logger.Logger, cfg CPConfig) (evmRelayTypes.ConfigPoller, error)
- func NewEVMEncoder(config *values.Map) (consensustypes.Encoder, error)
- func NewFunctionsProvider(ctx context.Context, chain legacyevm.Chain, rargs commontypes.RelayArgs, ...) (evmRelayTypes.FunctionsProvider, error)
- func NewKeepersOCR3ContractTransmitter(ocr2ContractTransmitter ocrtypes.ContractTransmitter) *ocr3keeperProviderContractTransmitter
- func NewLLOProvider(cp commontypes.ConfigProvider, transmitter llo.Transmitter, lggr logger.Logger, ...) relaytypes.LLOProvider
- func NewLegacyChainsFromRelayerExtenders(exts EVMChainRelayerExtenderSlicer) *legacyevm.LegacyChains
- func NewMercuryChainReader(h httypes.HeadTracker) mercurytypes.ChainReader
- func NewMercuryProvider(cp commontypes.ConfigProvider, chainReader commontypes.ContractReader, ...) *mercuryProvider
- func NewOCRContractTransmitter(ctx context.Context, address gethcommon.Address, caller contractReader, ...) (*contractTransmitter, error)
- func NewPluginProvider(chainReader types.ContractReader, codec types.Codec, ...) *pluginProvider
- func NewRoundRequestedDB(ds sqlutil.DataSource, oracleSpecID int32, lggr logger.Logger) *requestRoundDB
- func NewWriteTarget(ctx context.Context, relayer *Relayer, chain legacyevm.Chain, ...) (*targets.WriteTarget, error)
- func OnchainPublicKeyToAddress(publicKeys []types.OnchainPublicKey) (addresses []common.Address, err error)
- func WrapItemType(contractName, itemType string, isParams bool) string
- type BatchCall
- type BatchCaller
- type BatchResult
- type CPConfig
- type CSAETHKeystore
- type Call
- type ChainReaderService
- type ChainRelayerExt
- func (s *ChainRelayerExt) Chain() legacyevm.Chain
- func (s *ChainRelayerExt) Close() (err error)
- func (s *ChainRelayerExt) GetChainStatus(ctx context.Context) (commontypes.ChainStatus, error)
- func (s *ChainRelayerExt) HealthReport() map[string]error
- func (s *ChainRelayerExt) ID() string
- func (s *ChainRelayerExt) ListNodeStatuses(ctx context.Context, pageSize int32, pageToken string) (stats []commontypes.NodeStatus, nextPageToken string, total int, err error)
- func (s *ChainRelayerExt) Name() string
- func (s *ChainRelayerExt) Ready() (err error)
- func (s *ChainRelayerExt) Start(ctx context.Context) error
- func (s *ChainRelayerExt) Transact(ctx context.Context, from, to string, amount *big.Int, balanceCheck bool) error
- type ChainRelayerExtenders
- type ChainWriterService
- type ContractResults
- type ContractTransmitter
- type EVMChainRelayerExtender
- type EVMChainRelayerExtenderSlicer
- type LogDecoder
- type LoopRelayAdapter
- type LoopRelayer
- type MethodCallResult
- type NoContractExistsError
- type OCR2KeeperProvider
- type OCR2KeeperProviderOpts
- type OCR2KeeperRelayer
- type OCRTransmitterOption
- type ParsedTypes
- type Relayer
- func (r *Relayer) Close() error
- func (r *Relayer) HealthReport() (report map[string]error)
- func (r *Relayer) Name() string
- func (r *Relayer) NewAutomationProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.AutomationProvider, error)
- func (r *Relayer) NewCCIPCommitProvider(_ commontypes.RelayArgs, _ commontypes.PluginArgs) (commontypes.CCIPCommitProvider, error)
- func (r *Relayer) NewCCIPExecProvider(_ commontypes.RelayArgs, _ commontypes.PluginArgs) (commontypes.CCIPExecProvider, error)
- func (r *Relayer) NewChainWriter(_ context.Context, config []byte) (commontypes.ChainWriter, error)
- func (r *Relayer) NewConfigProvider(args commontypes.RelayArgs) (configProvider commontypes.ConfigProvider, err error)
- func (r *Relayer) NewContractReader(chainReaderConfig []byte) (commontypes.ContractReader, error)
- func (r *Relayer) NewFunctionsProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.FunctionsProvider, error)
- func (r *Relayer) NewLLOProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.LLOProvider, error)
- func (r *Relayer) NewMedianProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.MedianProvider, error)
- func (r *Relayer) NewMercuryProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.MercuryProvider, error)
- func (r *Relayer) NewOCR3CapabilityProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.OCR3CapabilityProvider, error)
- func (r *Relayer) NewPluginProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.PluginProvider, error)
- func (r *Relayer) Ready() error
- func (r *Relayer) Start(context.Context) error
- type RelayerOpts
- type ReportToEthMetadata
- type RequestRoundDB
- type RequestRoundTracker
- func (t *RequestRoundTracker) Close() error
- func (t *RequestRoundTracker) HandleLog(ctx context.Context, lb log.Broadcast)
- func (t *RequestRoundTracker) IsV2Job() bool
- func (t *RequestRoundTracker) JobID() int32
- func (t *RequestRoundTracker) LatestRoundRequested(_ context.Context, lookback time.Duration) (configDigest ocrtypes.ConfigDigest, epoch uint32, round uint8, err error)
- func (t *RequestRoundTracker) Start(ctx context.Context) error
- type Transmitter
Constants ¶
const ( // DefaultRpcBatchSizeLimit defines the maximum number of rpc requests to be included in a batch. DefaultRpcBatchSizeLimit = 100 // DefaultRpcBatchBackOffMultiplier defines the rate of reducing the batch size limit for retried calls. // For example if limit is 20 and multiplier is 4: // 1. 20 // 2. 20/4 = 5 // 3. 5/4 = 1 DefaultRpcBatchBackOffMultiplier = 5 // DefaultMaxParallelRpcCalls defines the default maximum number of individual in-parallel rpc calls. DefaultMaxParallelRpcCalls = 10 )
Variables ¶
var DecoderHooks = []mapstructure.DecodeHookFunc{ decodeAccountAndAllowArraySliceHook, codec.BigIntHook, codec.SliceToArrayVerifySizeHook, sizeVerifyBigIntHook, codec.NumberHook, }
DecoderHooks
decodeAccountAndAllowArraySliceHook allows:
strings to be converted to [32]byte allowing config to represent them as 0x... slices or arrays to be converted to a pointer to that type
BigIntHook allows *big.Int to be represented as any integer type or a string and to go back to them. Useful for config, or if when a model may use a go type that isn't a *big.Int when Pack expects one. Eg: int32 in a go struct from a plugin could require a *big.Int in Pack for int24, if it fits, we shouldn't care. SliceToArrayVerifySizeHook verifies that slices have the correct size when converting to an array sizeVerifyBigIntHook allows our custom types that verify the number fits in the on-chain type to be converted as-if it was a *big.Int
var ErrCorruptEVMChain = errors.New("corrupt evm chain")
var (
ErrInitializationFailure = fmt.Errorf("failed to initialize registry")
)
var ErrNoChains = errors.New("no EVM chains loaded")
ErrNoChains indicates that no EVM chains have been started
Functions ¶
func AccountToAddress ¶
func AddEntries ¶ added in v2.15.0
AddEntries extracts the mods from codecEntry and adds them to modByTypeName use with codec.NewByItemTypeModifier Since each input/output can have its own modifications, we need to keep track of them by type name
func ConfirmationsFromConfig ¶ added in v2.15.0
func ConfirmationsFromConfig(values map[string]int) (map[primitives.ConfidenceLevel]evmtypes.Confirmations, error)
ConfirmationsFromConfig maps chain agnostic confidence levels defined in config to predefined EVM finality.
func FilterNamesFromRelayArgs ¶
func FilterNamesFromRelayArgs(args commontypes.RelayArgs) (filterNames []string, err error)
func IsLaterThan ¶
IsLaterThan returns true if the first log was emitted "after" the second log from the blockchain's point of view
func NewChainReader ¶ added in v2.8.0
func NewChainReader(h httypes.HeadTracker) mercurytypes.ChainReader
func NewCodec ¶ added in v2.9.0
func NewCodec(conf types.CodecConfig) (commontypes.RemoteCodec, error)
NewCodec creates a new commontypes.RemoteCodec for EVM. Note that names in the ABI are converted to Go names using abi.ToCamelCase, this is per convention in abi.MakeTopics, abi.Arguments.Pack etc. This allows names on-chain to be in go convention when generated. It means that if you need to use a codec.Modifier to reference a field you need to use the Go name instead of the name on-chain. eg: rename FooBar -> Bar, not foo_bar_ to Bar if the name on-chain is foo_bar_
func NewConfigPoller ¶
func NewConfigPoller(ctx context.Context, lggr logger.Logger, cfg CPConfig) (evmRelayTypes.ConfigPoller, error)
func NewEVMEncoder ¶ added in v2.10.0
func NewEVMEncoder(config *values.Map) (consensustypes.Encoder, error)
func NewFunctionsProvider ¶
func NewFunctionsProvider(ctx context.Context, chain legacyevm.Chain, rargs commontypes.RelayArgs, pargs commontypes.PluginArgs, lggr logger.Logger, ethKeystore keystore.Eth, pluginType functionsRelay.FunctionsPluginType) (evmRelayTypes.FunctionsProvider, error)
func NewKeepersOCR3ContractTransmitter ¶ added in v2.5.0
func NewKeepersOCR3ContractTransmitter(ocr2ContractTransmitter ocrtypes.ContractTransmitter) *ocr3keeperProviderContractTransmitter
func NewLLOProvider ¶ added in v2.10.0
func NewLLOProvider( cp commontypes.ConfigProvider, transmitter llo.Transmitter, lggr logger.Logger, channelDefinitionCache llotypes.ChannelDefinitionCache, ) relaytypes.LLOProvider
func NewLegacyChainsFromRelayerExtenders ¶ added in v2.5.0
func NewLegacyChainsFromRelayerExtenders(exts EVMChainRelayerExtenderSlicer) *legacyevm.LegacyChains
func NewMercuryChainReader ¶ added in v2.9.0
func NewMercuryChainReader(h httypes.HeadTracker) mercurytypes.ChainReader
func NewMercuryProvider ¶
func NewMercuryProvider( cp commontypes.ConfigProvider, chainReader commontypes.ContractReader, codec commontypes.Codec, mercuryChainReader mercurytypes.ChainReader, transmitter evmmercury.Transmitter, reportCodecV1 v1.ReportCodec, reportCodecV2 v2.ReportCodec, reportCodecV3 v3.ReportCodec, lggr logger.Logger, ) *mercuryProvider
func NewOCRContractTransmitter ¶
func NewOCRContractTransmitter( ctx context.Context, address gethcommon.Address, caller contractReader, contractABI abi.ABI, transmitter Transmitter, lp logpoller.LogPoller, lggr logger.Logger, opts ...OCRTransmitterOption, ) (*contractTransmitter, error)
func NewPluginProvider ¶ added in v2.10.0
func NewPluginProvider( chainReader types.ContractReader, codec types.Codec, contractTransmitter ocrtypes.ContractTransmitter, configWatcher *configWatcher, lggr logger.Logger, ) *pluginProvider
func NewRoundRequestedDB ¶
func NewRoundRequestedDB(ds sqlutil.DataSource, oracleSpecID int32, lggr logger.Logger) *requestRoundDB
NewDB returns a new DB scoped to this oracleSpecID
func NewWriteTarget ¶ added in v2.13.0
func OnchainPublicKeyToAddress ¶
func OnchainPublicKeyToAddress(publicKeys []types.OnchainPublicKey) (addresses []common.Address, err error)
func WrapItemType ¶ added in v2.15.0
Types ¶
type BatchCaller ¶ added in v2.15.0
type BatchCaller interface { // BatchCall executes all the provided BatchRequest and returns the results in the same order // of the calls. Pass blockNumber=0 to use the latest block. BatchCall(ctx context.Context, blockNumber uint64, batchRequests BatchCall) (BatchResult, error) }
func NewDynamicLimitedBatchCaller ¶ added in v2.15.0
type BatchResult ¶ added in v2.15.0
type BatchResult map[string]ContractResults
BatchResult is organised by contracts names, key is contract name.
type CSAETHKeystore ¶ added in v2.5.0
type Call ¶ added in v2.15.0
type ChainReaderService ¶ added in v2.9.0
type ChainReaderService interface { services.ServiceCtx commontypes.ContractReader }
func NewChainReaderService ¶ added in v2.9.0
func NewChainReaderService(ctx context.Context, lggr logger.Logger, lp logpoller.LogPoller, ht logpoller.HeadTracker, client evmclient.Client, config types.ChainReaderConfig) (ChainReaderService, error)
NewChainReaderService is a constructor for ChainReader, returns nil if there is any error Note that the ChainReaderService returned does not support anonymous events.
type ChainRelayerExt ¶ added in v2.5.0
type ChainRelayerExt struct {
// contains filtered or unexported fields
}
implements OneChain
func (*ChainRelayerExt) Chain ¶ added in v2.5.0
func (s *ChainRelayerExt) Chain() legacyevm.Chain
func (*ChainRelayerExt) Close ¶ added in v2.5.0
func (s *ChainRelayerExt) Close() (err error)
func (*ChainRelayerExt) GetChainStatus ¶ added in v2.6.0
func (s *ChainRelayerExt) GetChainStatus(ctx context.Context) (commontypes.ChainStatus, error)
func (*ChainRelayerExt) HealthReport ¶ added in v2.5.0
func (s *ChainRelayerExt) HealthReport() map[string]error
func (*ChainRelayerExt) ID ¶ added in v2.6.0
func (s *ChainRelayerExt) ID() string
func (*ChainRelayerExt) ListNodeStatuses ¶ added in v2.6.0
func (s *ChainRelayerExt) ListNodeStatuses(ctx context.Context, pageSize int32, pageToken string) (stats []commontypes.NodeStatus, nextPageToken string, total int, err error)
func (*ChainRelayerExt) Name ¶ added in v2.5.0
func (s *ChainRelayerExt) Name() string
func (*ChainRelayerExt) Ready ¶ added in v2.5.0
func (s *ChainRelayerExt) Ready() (err error)
type ChainRelayerExtenders ¶ added in v2.5.0
type ChainRelayerExtenders struct {
// contains filtered or unexported fields
}
func NewChainRelayerExtenders ¶ added in v2.5.0
func NewChainRelayerExtenders(ctx context.Context, opts legacyevm.ChainRelayExtenderConfig) (*ChainRelayerExtenders, error)
func (*ChainRelayerExtenders) AppConfig ¶ added in v2.5.0
func (c *ChainRelayerExtenders) AppConfig() legacyevm.AppConfig
func (*ChainRelayerExtenders) Len ¶ added in v2.5.0
func (c *ChainRelayerExtenders) Len() int
func (*ChainRelayerExtenders) Slice ¶ added in v2.5.0
func (c *ChainRelayerExtenders) Slice() []EVMChainRelayerExtender
type ChainWriterService ¶ added in v2.13.0
type ChainWriterService interface { services.ServiceCtx commontypes.ChainWriter }
func NewChainWriterService ¶ added in v2.13.0
func NewChainWriterService(logger logger.Logger, client evmclient.Client, txm evmtxmgr.TxManager, estimator gas.EvmFeeEstimator, config types.ChainWriterConfig) (ChainWriterService, error)
type ContractResults ¶ added in v2.15.0
type ContractResults []MethodCallResult
type ContractTransmitter ¶
type ContractTransmitter interface { services.ServiceCtx ocrtypes.ContractTransmitter }
type EVMChainRelayerExtender ¶ added in v2.5.0
type EVMChainRelayerExtender interface { relay.RelayerExt Chain() legacyevm.Chain }
type EVMChainRelayerExtenderSlicer ¶ added in v2.5.0
type EVMChainRelayerExtenderSlicer interface { Slice() []EVMChainRelayerExtender Len() int AppConfig() legacyevm.AppConfig }
type LogDecoder ¶ added in v2.10.0
type LogDecoder interface { EventSig() common.Hash Decode(rawLog []byte) (ocrtypes.ContractConfig, error) }
var ( OCR2AggregatorTransmissionContractABI abi.ABI OCR2AggregatorLogDecoder LogDecoder ChannelVerifierLogDecoder LogDecoder )
type LoopRelayAdapter ¶ added in v2.5.0
type LoopRelayer ¶ added in v2.5.0
func NewLoopRelayServerAdapter ¶ added in v2.6.0
func NewLoopRelayServerAdapter(r *Relayer, cs EVMChainRelayerExtender) *LoopRelayer
func (*LoopRelayer) Chain ¶ added in v2.5.0
func (la *LoopRelayer) Chain() legacyevm.Chain
type MethodCallResult ¶ added in v2.15.0
type NoContractExistsError ¶ added in v2.14.0
func (NoContractExistsError) Error ¶ added in v2.14.0
func (e NoContractExistsError) Error() string
type OCR2KeeperProvider ¶
type OCR2KeeperProvider interface { commontypes.Plugin Registry() automation.Registry Encoder() automation.Encoder TransmitEventProvider() automation.EventProvider BlockSubscriber() automation.BlockSubscriber PayloadBuilder() automation.PayloadBuilder UpkeepStateStore() automation.UpkeepStateStore LogEventProvider() automation.LogEventProvider LogRecoverer() automation.LogRecoverer UpkeepProvider() automation.ConditionalUpkeepProvider }
OCR2KeeperProvider provides all components needed for a OCR2Keeper plugin.
type OCR2KeeperProviderOpts ¶
type OCR2KeeperProviderOpts struct { RArgs commontypes.RelayArgs PArgs commontypes.PluginArgs InstanceID int }
OCR2KeeperProviderOpts is the custom options to create a keeper provider
type OCR2KeeperRelayer ¶
type OCR2KeeperRelayer interface {
NewOCR2KeeperProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (OCR2KeeperProvider, error)
}
OCR2KeeperRelayer contains the relayer and instantiating functions for OCR2Keeper providers.
func NewOCR2KeeperRelayer ¶
func NewOCR2KeeperRelayer(ds sqlutil.DataSource, chain legacyevm.Chain, lggr logger.Logger, ethKeystore keystore.Eth) OCR2KeeperRelayer
NewOCR2KeeperRelayer is the constructor of ocr2keeperRelayer
type OCRTransmitterOption ¶ added in v2.15.0
type OCRTransmitterOption func(transmitter *contractTransmitter)
func WithExcludeSignatures ¶ added in v2.15.0
func WithExcludeSignatures() OCRTransmitterOption
func WithReportToEthMetadata ¶ added in v2.15.0
func WithReportToEthMetadata(reportToEvmTxMeta ReportToEthMetadata) OCRTransmitterOption
func WithRetention ¶ added in v2.15.0
func WithRetention(retention time.Duration) OCRTransmitterOption
type ParsedTypes ¶ added in v2.15.0
type ParsedTypes struct { EncoderDefs map[string]types.CodecEntry DecoderDefs map[string]types.CodecEntry }
func (*ParsedTypes) ToCodec ¶ added in v2.15.0
func (parsed *ParsedTypes) ToCodec() (commontypes.RemoteCodec, error)
type Relayer ¶
type Relayer struct {
// contains filtered or unexported fields
}
func NewRelayer ¶
func (*Relayer) HealthReport ¶
func (*Relayer) NewAutomationProvider ¶ added in v2.9.0
func (r *Relayer) NewAutomationProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.AutomationProvider, error)
func (*Relayer) NewCCIPCommitProvider ¶ added in v2.14.0
func (r *Relayer) NewCCIPCommitProvider(_ commontypes.RelayArgs, _ commontypes.PluginArgs) (commontypes.CCIPCommitProvider, error)
func (*Relayer) NewCCIPExecProvider ¶ added in v2.14.0
func (r *Relayer) NewCCIPExecProvider(_ commontypes.RelayArgs, _ commontypes.PluginArgs) (commontypes.CCIPExecProvider, error)
func (*Relayer) NewChainWriter ¶ added in v2.14.0
func (r *Relayer) NewChainWriter(_ context.Context, config []byte) (commontypes.ChainWriter, error)
func (*Relayer) NewConfigProvider ¶
func (r *Relayer) NewConfigProvider(args commontypes.RelayArgs) (configProvider commontypes.ConfigProvider, err error)
NewConfigProvider is called by bootstrap jobs
func (*Relayer) NewContractReader ¶ added in v2.13.0
func (r *Relayer) NewContractReader(chainReaderConfig []byte) (commontypes.ContractReader, error)
func (*Relayer) NewFunctionsProvider ¶ added in v2.5.0
func (r *Relayer) NewFunctionsProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.FunctionsProvider, error)
func (*Relayer) NewLLOProvider ¶ added in v2.10.0
func (r *Relayer) NewLLOProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.LLOProvider, error)
func (*Relayer) NewMedianProvider ¶
func (r *Relayer) NewMedianProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.MedianProvider, error)
func (*Relayer) NewMercuryProvider ¶
func (r *Relayer) NewMercuryProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.MercuryProvider, error)
func (*Relayer) NewOCR3CapabilityProvider ¶ added in v2.13.0
func (r *Relayer) NewOCR3CapabilityProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.OCR3CapabilityProvider, error)
func (*Relayer) NewPluginProvider ¶ added in v2.10.0
func (r *Relayer) NewPluginProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.PluginProvider, error)
type RelayerOpts ¶ added in v2.6.0
type RelayerOpts struct { DS sqlutil.DataSource CSAETHKeystore MercuryPool wsrpc.Pool TransmitterConfig mercury.TransmitterConfig CapabilitiesRegistry coretypes.CapabilitiesRegistry }
func (RelayerOpts) Validate ¶ added in v2.6.0
func (c RelayerOpts) Validate() error
type ReportToEthMetadata ¶ added in v2.1.0
type RequestRoundDB ¶
type RequestRoundDB interface { SaveLatestRoundRequested(ctx context.Context, rr ocr2aggregator.OCR2AggregatorRoundRequested) error LoadLatestRoundRequested(context.Context) (rr ocr2aggregator.OCR2AggregatorRoundRequested, err error) WithDataSource(sqlutil.DataSource) RequestRoundDB }
RequestRoundDB stores requested rounds for querying by the median plugin.
type RequestRoundTracker ¶
type RequestRoundTracker struct { services.StateMachine // contains filtered or unexported fields }
RequestRoundTracker subscribes to new request round logs.
func NewRequestRoundTracker ¶
func NewRequestRoundTracker( contract *offchain_aggregator_wrapper.OffchainAggregator, contractFilterer *ocr2aggregator.OCR2AggregatorFilterer, ethClient evmclient.Client, logBroadcaster log.Broadcaster, jobID int32, lggr logger.Logger, ds sqlutil.DataSource, odb RequestRoundDB, chain ocrcommon.Config, ) (o *RequestRoundTracker)
NewRequestRoundTracker makes a new RequestRoundTracker
func (*RequestRoundTracker) Close ¶
func (t *RequestRoundTracker) Close() error
Close should be called after teardown of the OCR job relying on this tracker
func (*RequestRoundTracker) HandleLog ¶
func (t *RequestRoundTracker) HandleLog(ctx context.Context, lb log.Broadcast)
HandleLog complies with LogListener interface It is not thread safe
func (*RequestRoundTracker) IsV2Job ¶
func (t *RequestRoundTracker) IsV2Job() bool
IsV2Job complies with LogListener interface
func (*RequestRoundTracker) JobID ¶
func (t *RequestRoundTracker) JobID() int32
JobID complies with LogListener interface
func (*RequestRoundTracker) LatestRoundRequested ¶
func (t *RequestRoundTracker) LatestRoundRequested(_ context.Context, lookback time.Duration) (configDigest ocrtypes.ConfigDigest, epoch uint32, round uint8, err error)
LatestRoundRequested returns the configDigest, epoch, and round from the latest RoundRequested event emitted by the contract. LatestRoundRequested may or may not return a result if the latest such event was emitted in a block b such that b.timestamp < tip.timestamp - lookback.
If no event is found, LatestRoundRequested should return zero values, not an error. An error should only be returned if an actual error occurred during execution, e.g. because there was an error querying the blockchain or the database.
As an optimization, this function may also return zero values, if no RoundRequested event has been emitted after the latest NewTransmission event.
type Transmitter ¶
type Transmitter interface { CreateEthTransaction(ctx context.Context, toAddress gethcommon.Address, payload []byte, txMeta *txmgr.TxMeta) error FromAddress() gethcommon.Address }
Source Files ¶
- address.go
- batch_caller.go
- binding.go
- bindings.go
- cap_encoder.go
- chain_reader.go
- chain_writer.go
- codec.go
- config_poller.go
- contract_binding.go
- contract_transmitter.go
- decoder.go
- encoder.go
- event_binding.go
- evm.go
- functions.go
- llo_config_provider.go
- llo_provider.go
- llo_verifier_decoder.go
- loop_impl.go
- median.go
- mercury_config_provider.go
- mercury_provider.go
- method_binding.go
- ocr2aggregator_decoder.go
- ocr2keeper.go
- ocr3_capability_provider.go
- parsed_types.go
- plugin_provider.go
- relayer_extender.go
- request_round_db.go
- request_round_tracker.go
- standard_config_provider.go
- write_target.go