Documentation ¶
Index ¶
- Constants
- Variables
- func NewEVMRegistryService(addr common.Address, client evm.Chain, mc *models.MercuryCredentials, ...) (*EvmRegistry, *EVMAutomationEncoder21, error)
- func NewEvmRegistryPackerV2_1(abi abi.ABI, utilsAbi abi.ABI) *evmRegistryPackerV2_1
- func NewOnchainKeyringV3Wrapper(keyring types.OnchainKeyring) *onchainKeyringV3Wrapper
- func NewPayloadBuilder(lggr logger.Logger) *payloadBuilder
- func NewUpkeepProvider(reg *EvmRegistry, lp logpoller.LogPoller) *upkeepProvider
- func TransmitEventProviderFilterName(addr common.Address) string
- func UpkeepFilterName(addr common.Address) string
- type AdminOffchainConfig
- type BlockSubscriber
- type EVMAutomationEncoder21
- type EvmRegistry
- func (r *EvmRegistry) CheckUpkeeps(ctx context.Context, keys ...ocr2keepers.UpkeepPayload) ([]ocr2keepers.CheckResult, error)
- func (r *EvmRegistry) Close() error
- func (r *EvmRegistry) GetActiveUpkeepIDs(ctx context.Context) ([]ocr2keepers.UpkeepIdentifier, error)
- func (r *EvmRegistry) GetActiveUpkeepIDsByType(ctx context.Context, triggers ...uint8) ([]ocr2keepers.UpkeepIdentifier, error)
- func (r *EvmRegistry) HealthReport() map[string]error
- func (r *EvmRegistry) LogEventProvider() logprovider.LogEventProvider
- func (r *EvmRegistry) Name() string
- func (r *EvmRegistry) Ready() error
- func (r *EvmRegistry) Start(ctx context.Context) error
- type FeedLookup
- type HttpClient
- type LatestBlockGetter
- type MercuryConfig
- type MercuryData
- type MercuryV02Response
- type MercuryV03Response
- type MercuryVersion
- type PipelineExecutionState
- type Registry
- type TransmitEventProvider
- func (c *TransmitEventProvider) Close() error
- func (c *TransmitEventProvider) GetLatestEvents(ctx context.Context) ([]ocr2keepers.TransmitEvent, error)
- func (c *TransmitEventProvider) HealthReport() map[string]error
- func (c *TransmitEventProvider) Name() string
- func (c *TransmitEventProvider) Ready() error
- func (c *TransmitEventProvider) Start(ctx context.Context) error
- type UpkeepFailureReason
- type UpkeepInfo
Constants ¶
View Source
const ( // upkeep failure onchain reasons UpkeepFailureReasonNone UpkeepFailureReason = 0 UpkeepFailureReasonUpkeepCancelled UpkeepFailureReason = 1 UpkeepFailureReasonUpkeepPaused UpkeepFailureReason = 2 UpkeepFailureReasonTargetCheckReverted UpkeepFailureReason = 3 UpkeepFailureReasonUpkeepNotNeeded UpkeepFailureReason = 4 UpkeepFailureReasonPerformDataExceedsLimit UpkeepFailureReason = 5 UpkeepFailureReasonInsufficientBalance UpkeepFailureReason = 6 UpkeepFailureReasonMercuryCallbackReverted UpkeepFailureReason = 7 UpkeepFailureReasonRevertDataExceedsLimit UpkeepFailureReason = 8 UpkeepFailureReasonRegistryPaused UpkeepFailureReason = 9 // leaving a gap here for more onchain failure reasons in the future // upkeep failure offchain reasons UpkeepFailureReasonMercuryAccessNotAllowed UpkeepFailureReason = 32 UpkeepFailureReasonLogBlockNoLongerExists UpkeepFailureReason = 31 UpkeepFailureReasonLogBlockInvalid UpkeepFailureReason = 32 UpkeepFailureReasonTxHashNoLongerExists UpkeepFailureReason = 33 // pipeline execution error NoPipelineError PipelineExecutionState = 0 CheckBlockTooOld PipelineExecutionState = 1 CheckBlockInvalid PipelineExecutionState = 2 RpcFlakyFailure PipelineExecutionState = 3 MercuryFlakyFailure PipelineExecutionState = 4 PackUnpackDecodeFailed PipelineExecutionState = 5 MercuryUnmarshalError PipelineExecutionState = 6 InvalidMercuryRequest PipelineExecutionState = 7 FailedToDecodeMercuryResponse PipelineExecutionState = 8 InvalidRevertDataInput PipelineExecutionState = 9 )
Variables ¶
View Source
var ( ErrLogReadFailure = fmt.Errorf("failure reading logs") ErrHeadNotAvailable = fmt.Errorf("head not available") ErrInitializationFailure = fmt.Errorf("failed to initialize registry") ErrContextCancelled = fmt.Errorf("context was cancelled") ErrABINotParsable = fmt.Errorf("error parsing abi") ActiveUpkeepIDBatchSize int64 = 1000 FetchUpkeepConfigBatchSize = 10 )
View Source
var (
ErrEmptyResults = fmt.Errorf("empty results; cannot encode")
)
Functions ¶
func NewEVMRegistryService ¶
func NewEVMRegistryService(addr common.Address, client evm.Chain, mc *models.MercuryCredentials, bs *BlockSubscriber, lggr logger.Logger) (*EvmRegistry, *EVMAutomationEncoder21, error)
func NewOnchainKeyringV3Wrapper ¶ added in v2.5.0
func NewOnchainKeyringV3Wrapper(keyring types.OnchainKeyring) *onchainKeyringV3Wrapper
func NewPayloadBuilder ¶ added in v2.5.0
func NewUpkeepProvider ¶ added in v2.5.0
func NewUpkeepProvider(reg *EvmRegistry, lp logpoller.LogPoller) *upkeepProvider
func TransmitEventProviderFilterName ¶ added in v2.4.0
func UpkeepFilterName ¶
Types ¶
type AdminOffchainConfig ¶
type AdminOffchainConfig struct {
MercuryEnabled bool `json:"mercuryEnabled"`
}
AdminOffchainConfig represents the administrative offchain config for each upkeep. It can be set by s_upkeepManager role on the registry. Upkeeps allowed to use Mercury server will have this set to true.
type BlockSubscriber ¶ added in v2.4.0
type BlockSubscriber struct {
// contains filtered or unexported fields
}
func NewBlockSubscriber ¶ added in v2.4.0
func NewBlockSubscriber(hb httypes.HeadBroadcaster, lp logpoller.LogPoller, lggr logger.Logger) *BlockSubscriber
func (*BlockSubscriber) Close ¶ added in v2.4.0
func (bs *BlockSubscriber) Close() error
func (*BlockSubscriber) Start ¶ added in v2.4.0
func (bs *BlockSubscriber) Start(ctx context.Context) error
func (*BlockSubscriber) Subscribe ¶ added in v2.4.0
func (bs *BlockSubscriber) Subscribe() (int, chan ocr2keepers.BlockHistory, error)
func (*BlockSubscriber) Unsubscribe ¶ added in v2.4.0
func (bs *BlockSubscriber) Unsubscribe(subId int) error
type EVMAutomationEncoder21 ¶
type EVMAutomationEncoder21 struct {
// contains filtered or unexported fields
}
func (EVMAutomationEncoder21) Encode ¶ added in v2.4.0
func (enc EVMAutomationEncoder21) Encode(results ...ocr2keepers.CheckResult) ([]byte, error)
func (EVMAutomationEncoder21) Extract ¶ added in v2.4.0
func (enc EVMAutomationEncoder21) Extract(raw []byte) ([]ocr2keepers.ReportedUpkeep, error)
Extract the plugin will call this function to accept/transmit reports
type EvmRegistry ¶
type EvmRegistry struct {
// contains filtered or unexported fields
}
func (*EvmRegistry) CheckUpkeeps ¶ added in v2.4.0
func (r *EvmRegistry) CheckUpkeeps(ctx context.Context, keys ...ocr2keepers.UpkeepPayload) ([]ocr2keepers.CheckResult, error)
func (*EvmRegistry) Close ¶
func (r *EvmRegistry) Close() error
func (*EvmRegistry) GetActiveUpkeepIDs ¶
func (r *EvmRegistry) GetActiveUpkeepIDs(ctx context.Context) ([]ocr2keepers.UpkeepIdentifier, error)
GetActiveUpkeepIDs uses the latest head and map of all active upkeeps to build a slice of upkeep keys.
func (*EvmRegistry) GetActiveUpkeepIDsByType ¶
func (r *EvmRegistry) GetActiveUpkeepIDsByType(ctx context.Context, triggers ...uint8) ([]ocr2keepers.UpkeepIdentifier, error)
GetActiveUpkeepIDsByType returns all active upkeeps of the given trigger types.
func (*EvmRegistry) HealthReport ¶
func (r *EvmRegistry) HealthReport() map[string]error
func (*EvmRegistry) LogEventProvider ¶ added in v2.4.0
func (r *EvmRegistry) LogEventProvider() logprovider.LogEventProvider
func (*EvmRegistry) Name ¶
func (r *EvmRegistry) Name() string
func (*EvmRegistry) Ready ¶
func (r *EvmRegistry) Ready() error
type FeedLookup ¶
type FeedLookup struct {
// contains filtered or unexported fields
}
type LatestBlockGetter ¶
type LatestBlockGetter interface {
LatestBlock() int64
}
type MercuryConfig ¶
type MercuryConfig struct {
// contains filtered or unexported fields
}
type MercuryData ¶ added in v2.5.0
type MercuryData struct { Index int Error error Retryable bool Bytes [][]byte State PipelineExecutionState }
type MercuryV02Response ¶ added in v2.5.0
type MercuryV02Response struct {
ChainlinkBlob string `json:"chainlinkBlob"`
}
MercuryV02Response represents a JSON structure used by Mercury v0.2
type MercuryV03Response ¶ added in v2.5.0
type MercuryV03Response struct { FeedID string `json:"feedID"` ValidFromTimestamp string `json:"validFromTimestamp"` ObservationsTimestamp string `json:"observationsTimestamp"` FullReport string `json:"fullReport"` }
MercuryV03Response represents a JSON structure used by Mercury v0.3
type MercuryVersion ¶
type MercuryVersion string
type PipelineExecutionState ¶
type PipelineExecutionState uint8
type Registry ¶
type Registry interface { GetUpkeep(opts *bind.CallOpts, id *big.Int) (UpkeepInfo, error) GetState(opts *bind.CallOpts) (iregistry21.GetState, error) GetActiveUpkeepIDs(opts *bind.CallOpts, startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) GetUpkeepPrivilegeConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) GetUpkeepTriggerConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) CheckCallback(opts *bind.TransactOpts, id *big.Int, values [][]byte, extraData []byte) (*coreTypes.Transaction, error) ParseLog(log coreTypes.Log) (generated.AbigenLog, error) }
type TransmitEventProvider ¶ added in v2.4.0
type TransmitEventProvider struct {
// contains filtered or unexported fields
}
func NewTransmitEventProvider ¶ added in v2.4.0
func (*TransmitEventProvider) Close ¶ added in v2.4.0
func (c *TransmitEventProvider) Close() error
func (*TransmitEventProvider) GetLatestEvents ¶ added in v2.5.0
func (c *TransmitEventProvider) GetLatestEvents(ctx context.Context) ([]ocr2keepers.TransmitEvent, error)
func (*TransmitEventProvider) HealthReport ¶ added in v2.4.0
func (c *TransmitEventProvider) HealthReport() map[string]error
func (*TransmitEventProvider) Name ¶ added in v2.4.0
func (c *TransmitEventProvider) Name() string
func (*TransmitEventProvider) Ready ¶ added in v2.4.0
func (c *TransmitEventProvider) Ready() error
type UpkeepFailureReason ¶
type UpkeepFailureReason uint8
type UpkeepInfo ¶
type UpkeepInfo = iregistry21.KeeperRegistryBase21UpkeepInfo
Source Files ¶
Click to show internal directories.
Click to hide internal directories.