core

package
v2.5.3-clf-20230919 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 12 Imported by: 0

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 ocr2keepers.UpkeepType, rand string) ocr2keepers.UpkeepIdentifier

GenUpkeepID generates an ocr2keepers.UpkeepIdentifier with a specific UpkeepType and some random string

func GetTxBlock added in v2.6.0

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

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