common

package
v0.75.0-preview.2 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCallSpecIsNil      = errors.New("ethereum call spec proto is nil")
	ErrInvalidEthereumAbi = errors.New("is not a valid ethereum abi definition")
	ErrInvalidCallTrigger = errors.New("ethereum call trigger not valid")
	ErrInvalidCallArgs    = errors.New("ethereum call args not valid")
	ErrInvalidFilters     = errors.New("ethereum call filters not valid")
)

Functions

This section is empty.

Types

type Spec

type Spec struct {
	Address               string
	AbiJson               []byte
	Method                string
	ArgsJson              []string
	Trigger               Trigger
	RequiredConfirmations uint64
	Normalisers           map[string]string
	Filters               common.SpecFilters
	SourceChainID         uint64
}

func SpecFromProto

func SpecFromProto(proto *vegapb.EthCallSpec) (Spec, error)

func (Spec) DeepClone

func (s Spec) DeepClone() common.DataSourceType

Whats the need for this deep clone?

func (Spec) GetFilters

func (s Spec) GetFilters() []*common.SpecFilter

func (Spec) IntoProto

func (s Spec) IntoProto() (*vegapb.EthCallSpec, error)

func (Spec) IsZero

func (s Spec) IsZero() bool

func (Spec) String

func (s Spec) String() string

func (Spec) ToDefinitionProto

func (s Spec) ToDefinitionProto() (*vegapb.DataSourceDefinition, error)

type TimeTrigger

type TimeTrigger struct {
	Initial uint64
	Every   uint64 // 0 = don't repeat
	Until   uint64 // 0 = forever
}

func TimeTriggerFromProto

func TimeTriggerFromProto(protoTrigger *vegapb.EthTimeTrigger) TimeTrigger

func (TimeTrigger) DeepClone

func (e TimeTrigger) DeepClone() Trigger

func (TimeTrigger) IntoProto

func (e TimeTrigger) IntoProto() *vegapb.EthTimeTrigger

func (TimeTrigger) IntoTriggerProto

func (e TimeTrigger) IntoTriggerProto() *vegapb.EthCallTrigger

func (TimeTrigger) String

func (e TimeTrigger) String() string

type Trigger

type Trigger interface {
	IntoTriggerProto() *vegapb.EthCallTrigger
	DeepClone() Trigger
	String() string
}

func TriggerFromProto

func TriggerFromProto(proto *vegapb.EthCallTrigger) (Trigger, error)

Jump to

Keyboard shortcuts

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