Documentation ¶
Index ¶
- Constants
- Variables
- func CalcPositioningConstant(upkeepID int64, registryAddress ethkey.EIP55Address) (int32, error)
- func ValidatedKeeperSpec(tomlString string) (job.Job, error)
- type Config
- type Delegate
- type MailRoom
- type ORM
- func (korm ORM) BatchDeleteUpkeepsForJob(jobID int32, upkeepIDs []int64) (int64, error)
- func (korm ORM) EligibleUpkeepsForRegistry(registryAddress ethkey.EIP55Address, blockNumber, gracePeriod int64) (upkeeps []UpkeepRegistration, err error)
- func (korm ORM) LowestUnsyncedID(regID int64) (nextID int64, err error)
- func (korm ORM) Q() pg.Q
- func (korm ORM) Registries() ([]Registry, error)
- func (korm ORM) RegistryForJob(jobID int32) (Registry, error)
- func (korm ORM) SetLastRunHeightForUpkeepOnJob(jobID int32, upkeepID, height int64, qopts ...pg.QOpt) error
- func (korm ORM) UpsertRegistry(registry *Registry) error
- func (korm ORM) UpsertUpkeep(registration *UpkeepRegistration) error
- type Registry
- type RegistrySynchronizer
- func (rs *RegistrySynchronizer) Close() error
- func (rs *RegistrySynchronizer) HandleLog(broadcast log.Broadcast)
- func (rs *RegistrySynchronizer) HandleUpkeepRegistered(broadcast log.Broadcast, registry Registry)
- func (rs *RegistrySynchronizer) JobID() int32
- func (rs *RegistrySynchronizer) Start() error
- type RegistrySynchronizerOptions
- type UpkeepExecuter
- type UpkeepRegistration
Constants ¶
const ( // ExpectedObservationSource this is the expected observation source of the keeper job. ExpectedObservationSource = `` /* 1768-byte string literal not displayed */ )
Variables ¶
var RegistryABI = evmtypes.MustGetABI(keeper_registry_wrapper.KeeperRegistryABI)
Functions ¶
func CalcPositioningConstant ¶ added in v0.10.5
func CalcPositioningConstant(upkeepID int64, registryAddress ethkey.EIP55Address) (int32, error)
CalcPositioningConstant calculates a positioning constant. The positioning constant is fixed because upkeepID and registryAddress are immutable
Types ¶
type Config ¶ added in v0.10.11
type Config interface { EvmEIP1559DynamicFees() bool KeeperDefaultTransactionQueueDepth() uint32 KeeperGasPriceBufferPercent() uint32 KeeperGasTipCapBufferPercent() uint32 KeeperMaximumGracePeriod() int64 KeeperRegistryCheckGasOverhead() uint64 KeeperRegistryPerformGasOverhead() uint64 KeeperRegistrySyncInterval() time.Duration KeeperRegistrySyncUpkeepQueueSize() uint32 KeeperCheckUpkeepGasPriceFeatureEnabled() bool LogSQL() bool }
type Delegate ¶
type Delegate struct {
// contains filtered or unexported fields
}
func NewDelegate ¶
func NewDelegate( db *sqlx.DB, jrm job.ORM, pr pipeline.Runner, logger logger.Logger, chainSet evm.ChainSet, ) *Delegate
NewDelegate is the constructor of Delegate
func (Delegate) AfterJobCreated ¶ added in v0.10.11
func (Delegate) BeforeJobDeleted ¶ added in v0.10.11
type MailRoom ¶ added in v0.10.4
type MailRoom struct {
// contains filtered or unexported fields
}
MailRoom holds the log mailboxes for all the log types that keeper cares about
type ORM ¶
type ORM struct {
// contains filtered or unexported fields
}
ORM implements ORM layer using PostgreSQL
func NewORM ¶
func NewORM(db *sqlx.DB, lggr logger.Logger, config Config, strategy bulletprooftxmanager.TxStrategy) ORM
NewORM is the constructor of postgresORM
func (ORM) BatchDeleteUpkeepsForJob ¶ added in v0.10.4
BatchDeleteUpkeepsForJob deletes all upkeeps by the given IDs for the job with the given ID
func (ORM) EligibleUpkeepsForRegistry ¶ added in v0.10.8
func (korm ORM) EligibleUpkeepsForRegistry( registryAddress ethkey.EIP55Address, blockNumber, gracePeriod int64, ) (upkeeps []UpkeepRegistration, err error)
func (ORM) LowestUnsyncedID ¶
LowestUnsyncedID returns the largest upkeepID + 1, indicating the expected next upkeepID to sync from the contract
func (ORM) Registries ¶
Registries returns all registries
func (ORM) RegistryForJob ¶ added in v0.10.4
RegistryForJob returns a specific registry for a job with the given ID
func (ORM) SetLastRunHeightForUpkeepOnJob ¶ added in v0.10.4
func (ORM) UpsertRegistry ¶
UpsertRegistry upserts registry by the given input
func (ORM) UpsertUpkeep ¶
func (korm ORM) UpsertUpkeep(registration *UpkeepRegistration) error
UpsertUpkeep upserts upkeep by the given input
type Registry ¶
type Registry struct { ID int64 BlockCountPerTurn int32 CheckGas int32 ContractAddress ethkey.EIP55Address FromAddress ethkey.EIP55Address JobID int32 KeeperIndex int32 NumKeepers int32 }
type RegistrySynchronizer ¶
type RegistrySynchronizer struct { utils.StartStopOnce // contains filtered or unexported fields }
func NewRegistrySynchronizer ¶
func NewRegistrySynchronizer(opts RegistrySynchronizerOptions) *RegistrySynchronizer
NewRegistrySynchronizer is the constructor of RegistrySynchronizer
func (*RegistrySynchronizer) Close ¶
func (rs *RegistrySynchronizer) Close() error
func (*RegistrySynchronizer) HandleLog ¶ added in v0.10.4
func (rs *RegistrySynchronizer) HandleLog(broadcast log.Broadcast)
func (*RegistrySynchronizer) HandleUpkeepRegistered ¶ added in v0.10.11
func (rs *RegistrySynchronizer) HandleUpkeepRegistered(broadcast log.Broadcast, registry Registry)
func (*RegistrySynchronizer) JobID ¶ added in v0.10.4
func (rs *RegistrySynchronizer) JobID() int32
func (*RegistrySynchronizer) Start ¶
func (rs *RegistrySynchronizer) Start() error
type RegistrySynchronizerOptions ¶ added in v1.1.0
type RegistrySynchronizerOptions struct { Job job.Job Contract *keeper_registry_wrapper.KeeperRegistry ORM ORM JRM job.ORM LogBroadcaster log.Broadcaster SyncInterval time.Duration MinIncomingConfirmations uint32 Logger logger.Logger SyncUpkeepQueueSize uint32 }
type UpkeepExecuter ¶ added in v0.10.6
type UpkeepExecuter struct { utils.StartStopOnce // contains filtered or unexported fields }
UpkeepExecuter implements the logic to communicate with KeeperRegistry
func NewUpkeepExecuter ¶ added in v0.10.6
func NewUpkeepExecuter( job job.Job, orm ORM, pr pipeline.Runner, ethClient evmclient.Client, headBroadcaster httypes.HeadBroadcaster, gasEstimator gas.Estimator, logger logger.Logger, config Config, ) *UpkeepExecuter
NewUpkeepExecuter is the constructor of UpkeepExecuter
func (*UpkeepExecuter) Close ¶ added in v0.10.6
func (ex *UpkeepExecuter) Close() error
Close stops and closes upkeep executer
func (*UpkeepExecuter) OnNewLongestChain ¶ added in v0.10.6
func (ex *UpkeepExecuter) OnNewLongestChain(_ context.Context, head *evmtypes.Head)
OnNewLongestChain handles the given head of a new longest chain
func (*UpkeepExecuter) Start ¶ added in v0.10.6
func (ex *UpkeepExecuter) Start() error
Start starts the upkeep executer logic