v2

package
v0.0.0-...-47b5856 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Observation

type Observation struct {
	BenchmarkPrice mercury.ObsResult[*big.Int]

	MaxFinalizedTimestamp mercury.ObsResult[int64]

	LinkPrice   mercury.ObsResult[*big.Int]
	NativePrice mercury.ObsResult[*big.Int]
}

type ReportCodec

type ReportCodec interface {
	// BuildReport Implementers may assume that there is at most one
	// ParsedAttributedObservation per observer, and that all observers are
	// valid. However, observation values, timestamps, etc... should all be
	// treated as untrusted.
	BuildReport(ReportFields) (ocrtypes.Report, error)

	// MaxReportLength Returns the maximum length of a report based on n, the number of oracles.
	// The output of BuildReport must respect this maximum length.
	MaxReportLength(n int) (int, error)

	ObservationTimestampFromReport(ocrtypes.Report) (uint32, error)
}

ReportCodec All functions on ReportCodec should be pure and thread-safe. Be careful validating and parsing any data passed.

type ReportFields

type ReportFields struct {
	ValidFromTimestamp uint32
	Timestamp          uint32
	NativeFee          *big.Int
	LinkFee            *big.Int
	ExpiresAt          uint32
	BenchmarkPrice     *big.Int
}

Jump to

Keyboard shortcuts

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