encoding

package
v2.5.1-automation-2023... Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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
	UpkeepFailureReasonTxHashNoLongerExists    UpkeepFailureReason = 33
	UpkeepFailureReasonInvalidRevertDataInput  UpkeepFailureReason = 34
	UpkeepFailureReasonSimulationFailed        UpkeepFailureReason = 35
	UpkeepFailureReasonTxHashReorged           UpkeepFailureReason = 36

	// 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
	InvalidMercuryResponse PipelineExecutionState = 8 // this will only happen if Mercury server sends bad responses
	UpkeepNotAuthorized    PipelineExecutionState = 9
)

Variables

View Source
var (
	ErrEmptyResults = fmt.Errorf("empty results; cannot encode")
)

Functions

func GetIneligibleCheckResultWithoutPerformData

func GetIneligibleCheckResultWithoutPerformData(p ocr2keepers.UpkeepPayload, reason UpkeepFailureReason, state PipelineExecutionState, retryable bool) ocr2keepers.CheckResult

GetIneligibleCheckResultWithoutPerformData returns an ineligible check result with ineligibility reason and pipeline execution state but without perform data

func NewAbiPacker

func NewAbiPacker(abi abi.ABI, utilsAbi abi.ABI) *abiPacker

func NewReportEncoder

func NewReportEncoder(p Packer) ocr2keepers.Encoder

Types

type Packer

type Packer interface {
	UnpackCheckResult(payload ocr2keepers.UpkeepPayload, raw string) (ocr2keepers.CheckResult, error)
	UnpackCheckCallbackResult(callbackResp []byte) (PipelineExecutionState, bool, []byte, uint8, *big.Int, error)
	UnpackPerformResult(raw string) (PipelineExecutionState, bool, error)
	UnpackLogTriggerConfig(raw []byte) (automation_utils_2_1.LogTriggerConfig, error)
	PackReport(report automation_utils_2_1.KeeperRegistryBase21Report) ([]byte, error)
	UnpackReport(raw []byte) (automation_utils_2_1.KeeperRegistryBase21Report, error)
}

type PipelineExecutionState

type PipelineExecutionState uint8

type UpkeepFailureReason

type UpkeepFailureReason uint8

Jump to

Keyboard shortcuts

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