Documentation ¶
Index ¶
- Variables
- func GenUpkeepID(uType types.UpkeepType, rand string) ocr2keepers.UpkeepIdentifier
- func GetTxBlock(ctx context.Context, client client.Client, txHash common.Hash) (*big.Int, common.Hash, error)
- func GetUpkeepType(id ocr2keepers.UpkeepIdentifier) types.UpkeepType
- func NewUpkeepPayload(id *big.Int, trigger ocr2keepers.Trigger, checkData []byte) (ocr2keepers.UpkeepPayload, error)
- func PackTrigger(id *big.Int, trig triggerWrapper) ([]byte, error)
- func UnpackTrigger(id *big.Int, raw []byte) (triggerWrapper, error)
- func UpkeepIDFromInt(id string) ocr2keepers.UpkeepIdentifier
- func UpkeepWorkID(uid ocr2keepers.UpkeepIdentifier, trigger ocr2keepers.Trigger) string
- type UpkeepStateReader
Constants ¶
This section is empty.
Variables ¶
var AutoV2CommonABI = types.MustGetABI(autov2common.IAutomationV21PlusCommonABI)
var CompatibleUtilsABI = types.MustGetABI(ac.AutomationCompatibleUtilsABI)
var ErrABINotParsable = fmt.Errorf("error parsing abi")
var (
ErrInvalidUpkeepID = fmt.Errorf("invalid upkeepID")
)
var ILogAutomationABI = types.MustGetABI(i_log_automation.ILogAutomationABI)
var StreamsCompatibleABI = types.MustGetABI(streams_lookup_compatible_interface.StreamsLookupCompatibleInterfaceABI)
Functions ¶
func GenUpkeepID ¶
func GenUpkeepID(uType types.UpkeepType, rand string) ocr2keepers.UpkeepIdentifier
GenUpkeepID generates an ocr2keepers.UpkeepIdentifier with a specific UpkeepType and some random string
func GetTxBlock ¶
func GetTxBlock(ctx context.Context, client client.Client, txHash common.Hash) (*big.Int, common.Hash, error)
GetTxBlock calls eth_getTransactionReceipt on the eth client to obtain a tx receipt
func GetUpkeepType ¶
func GetUpkeepType(id ocr2keepers.UpkeepIdentifier) types.UpkeepType
GetUpkeepType returns the upkeep type from the given ID. it follows the same logic as the contract, but performs it locally.
func NewUpkeepPayload ¶
func NewUpkeepPayload(id *big.Int, trigger ocr2keepers.Trigger, checkData []byte) (ocr2keepers.UpkeepPayload, error)
func PackTrigger ¶
PackTrigger packs the trigger data according to the upkeep type of the given id. it will remove the first 4 bytes of function selector.
func UnpackTrigger ¶
UnpackTrigger unpacks the trigger from the given raw data, according to the upkeep type of the given id.
func UpkeepIDFromInt ¶
func UpkeepIDFromInt(id string) ocr2keepers.UpkeepIdentifier
UpkeepIDFromInt converts an int string to ocr2keepers.UpkeepIdentifier
func UpkeepWorkID ¶
func UpkeepWorkID(uid ocr2keepers.UpkeepIdentifier, trigger ocr2keepers.Trigger) string
Types ¶
type UpkeepStateReader ¶
type UpkeepStateReader interface {
SelectByWorkIDs(ctx context.Context, workIDs ...string) ([]ocr2keepers.UpkeepState, error)
}
UpkeepStateReader is the interface for reading the current state of upkeeps.