offchainreporting

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const OCRContractConfigSubscriptionHandleLogTimeout = 5 * time.Second

Variables

View Source
var (
	OCRContractConfigSet = getConfigSetHash()
)

Functions

func NewDB

func NewDB(sqldb *sql.DB, oracleSpecID int) ocrtypes.Database

NewDB returns a new DB scoped to this oracleSpecID

Types

type OCRContract

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

func NewOCRContract

func NewOCRContract(address gethCommon.Address, ethClient eth.Client, logBroadcaster eth.LogBroadcaster, jobID models.ID, transmitter Transmitter, logger logger.Logger) (o *OCRContract, err error)

func (*OCRContract) ConfigFromLogs

func (oc *OCRContract) ConfigFromLogs(ctx context.Context, changedInBlock uint64) (c ocrtypes.ContractConfig, err error)

func (*OCRContract) FromAddress

func (oc *OCRContract) FromAddress() gethCommon.Address

func (*OCRContract) LatestBlockHeight

func (oc *OCRContract) LatestBlockHeight(ctx context.Context) (blockheight uint64, err error)

func (*OCRContract) LatestConfigDetails

func (oc *OCRContract) LatestConfigDetails(ctx context.Context) (changedInBlock uint64, configDigest ocrtypes.ConfigDigest, err error)

func (*OCRContract) LatestTransmissionDetails

func (oc *OCRContract) LatestTransmissionDetails(ctx context.Context) (configDigest ocrtypes.ConfigDigest, epoch uint32, round uint8, latestAnswer ocrtypes.Observation, latestTimestamp time.Time, err error)

func (*OCRContract) SubscribeToNewConfigs

func (oc *OCRContract) SubscribeToNewConfigs(context.Context) (ocrtypes.ContractConfigSubscription, error)

func (*OCRContract) Transmit

func (oc *OCRContract) Transmit(ctx context.Context, report []byte, rs, ss [][32]byte, vs [32]byte) error

type OCRContractConfigSubscription

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

func (*OCRContractConfigSubscription) Close

func (sub *OCRContractConfigSubscription) Close()

Close complies with ContractConfigSubscription interface

func (*OCRContractConfigSubscription) Configs

Configs complies with ContractConfigSubscription interface

func (*OCRContractConfigSubscription) HandleLog

func (sub *OCRContractConfigSubscription) HandleLog(lb eth.LogBroadcast, err error)

HandleLog complies with LogListener interface

func (*OCRContractConfigSubscription) JobID

func (sub *OCRContractConfigSubscription) JobID() *models.ID

JobID complies with LogListener interface

func (*OCRContractConfigSubscription) OnConnect

func (sub *OCRContractConfigSubscription) OnConnect()

OnConnect complies with LogListener interface

func (*OCRContractConfigSubscription) OnDisconnect

func (sub *OCRContractConfigSubscription) OnDisconnect()

OnDisconnect complies with LogListener interface

type Transmitter

type Transmitter interface {
	CreateEthTransaction(ctx context.Context, toAddress gethCommon.Address, payload []byte) error
	FromAddress() gethCommon.Address
}

func NewTransmitter

func NewTransmitter(sqldb *sql.DB, fromAddress gethCommon.Address, gasLimit uint64) Transmitter

NewTransmitter creates a new eth transmitter

Jump to

Keyboard shortcuts

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