reportcodec

package
v2.11.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReportTypes = reporttypes.GetSchema()

NOTE: This report codec is based on the original median evmreportcodec here: https://github.com/smartcontractkit/offchain-reporting/blob/master/lib/offchainreporting2/reportingplugin/median/evmreportcodec/reportcodec.go

Functions

This section is empty.

Types

type ReportCodec

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

func NewReportCodec

func NewReportCodec(feedID [32]byte, lggr logger.Logger) *ReportCodec

func (*ReportCodec) BenchmarkPriceFromReport added in v2.6.0

func (r *ReportCodec) BenchmarkPriceFromReport(report ocrtypes.Report) (*big.Int, error)

func (*ReportCodec) BuildReport

func (r *ReportCodec) BuildReport(rf v1.ReportFields) (ocrtypes.Report, error)

func (*ReportCodec) CurrentBlockNumFromReport

func (r *ReportCodec) CurrentBlockNumFromReport(report ocrtypes.Report) (int64, error)

func (*ReportCodec) Decode

func (r *ReportCodec) Decode(report ocrtypes.Report) (*reporttypes.Report, error)

func (*ReportCodec) MaxReportLength

func (r *ReportCodec) MaxReportLength(n int) (int, error)

Maximum length in bytes of Report returned by BuildReport. Used for defending against spam attacks.

func (*ReportCodec) ValidFromBlockNumFromReport

func (r *ReportCodec) ValidFromBlockNumFromReport(report ocrtypes.Report) (int64, error)

Jump to

Keyboard shortcuts

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