core

package
v2.11.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrABINotParsable = fmt.Errorf("error parsing abi")
View Source
var (
	ErrInvalidUpkeepID = fmt.Errorf("invalid upkeepID")
)

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

func PackTrigger(id *big.Int, trig triggerWrapper) ([]byte, error)

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

func UnpackTrigger(id *big.Int, raw []byte) (triggerWrapper, error)

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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