vrf

package
v1.10.17 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Gas to be used
	GasAfterPaymentCalculation = 5000 +
		2100 +
		20000 +
		2*2100 -
		4800 +
		21000 +
		6874 // Static costs of argument encoding etc. note that it varies by +/- x*12 for every x bytes of non-zero data in the proof.
)

Variables

View Source
var (
	ErrKeyNotSet = errors.New("key not set")
)

Functions

func GetStartingResponseCountsV2 added in v1.10.17

func GetStartingResponseCountsV2(db *gorm.DB, l logger.Logger) map[string]uint64

func VRFCoordinatorABI added in v1.10.17

func VRFCoordinatorABI() abi.ABI

VRFCoordinatorABI returns the ABI for the VRFCoordinator contract

func VRFFulfillMethod added in v1.10.17

func VRFFulfillMethod() abi.Method

VRFFulfillMethod returns the golang abstraction of the fulfillRandomnessRequest method

func VRFFulfillSelector added in v1.10.17

func VRFFulfillSelector() string

VRFFulfillSelector returns the signature of the fulfillRandomnessRequest method on the VRFCoordinator contract

func VRFRandomnessRequestLogTopic added in v1.10.17

func VRFRandomnessRequestLogTopic() common.Hash

VRFRandomnessRequestLogTopic returns the signature of the RandomnessRequest log emitted by the VRFCoordinator contract

func ValidatedVRFSpec

func ValidatedVRFSpec(tomlString string) (job.Job, error)

Types

type Config

type Config interface {
	MinIncomingConfirmations() uint32
	EvmGasLimitDefault() uint64
}

type Delegate

type Delegate struct {
	// contains filtered or unexported fields
}

func NewDelegate

func NewDelegate(
	db *gorm.DB,
	ks keystore.Master,
	pr pipeline.Runner,
	porm pipeline.ORM,
	chainSet evm.ChainSet,
	lggr logger.Logger) *Delegate

func (*Delegate) AfterJobCreated

func (d *Delegate) AfterJobCreated(spec job.Job)

func (*Delegate) BeforeJobDeleted

func (d *Delegate) BeforeJobDeleted(spec job.Job)

func (*Delegate) JobType

func (d *Delegate) JobType() job.Type

func (*Delegate) ServicesForSpec

func (d *Delegate) ServicesForSpec(jb job.Job) ([]job.Service, error)

type GethKeyStore

type GethKeyStore interface {
	GetRoundRobinAddress(addresses ...common.Address) (common.Address, error)
}

type RandomnessRequestLog added in v1.10.17

type RandomnessRequestLog struct {
	KeyHash   common.Hash
	Seed      *big.Int // uint256
	JobID     common.Hash
	Sender    common.Address
	Fee       *assets.Link // uint256
	RequestID common.Hash
	Raw       RawRandomnessRequestLog
}

RandomnessRequestLog contains the data for a RandomnessRequest log, represented as compatible golang types.

func ParseRandomnessRequestLog added in v1.10.17

func ParseRandomnessRequestLog(log types.Log) (*RandomnessRequestLog, error)

ParseRandomnessRequestLog returns the RandomnessRequestLog corresponding to the raw logData

func RawRandomnessRequestLogToRandomnessRequestLog added in v1.10.17

func RawRandomnessRequestLogToRandomnessRequestLog(
	l *RawRandomnessRequestLog) *RandomnessRequestLog

func (*RandomnessRequestLog) ComputedRequestID added in v1.10.17

func (l *RandomnessRequestLog) ComputedRequestID() common.Hash

func (*RandomnessRequestLog) Equal added in v1.10.17

Equal(ol) is true iff l is the same log as ol, and both represent valid RandomnessRequest logs.

func (*RandomnessRequestLog) RawData added in v1.10.17

func (l *RandomnessRequestLog) RawData() ([]byte, error)

RawData returns the raw bytes corresponding to l in a solidity log

This serialization does not include the JobID, because that's an indexed field.

type RawRandomnessRequestLog added in v1.10.17

RawRandomnessRequestLog is used to parse a RandomnessRequest log into types go-ethereum knows about.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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