v1_test

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DataSource = staticDataSource{}
View Source
var Fixtures = Parameters{

	Report: ocr2plus_types.Report([]byte("mercury v1 report")),
	ReportFields: mercury_v1_types.ReportFields{
		Timestamp:             0,
		BenchmarkPrice:        big.NewInt(5),
		Ask:                   big.NewInt(6),
		Bid:                   big.NewInt(7),
		CurrentBlockNum:       8,
		CurrentBlockHash:      []byte("mercury v1 current block hash"),
		ValidFromBlockNum:     9,
		CurrentBlockTimestamp: 10,
	},
	MaxReportLength: 20,
	CurrentBlockNum: 23,

	ReportTimestamp: ocr2plus_types.ReportTimestamp{
		ConfigDigest: [32]byte([]byte("mercury v1 configuration digest!")),
		Epoch:        0,
		Round:        1,
	},
	Observation: mercury_v1_types.Observation{
		BenchmarkPrice:          mercury.ObsResult[*big.Int]{Val: big.NewInt(50)},
		Ask:                     mercury.ObsResult[*big.Int]{Val: big.NewInt(60)},
		Bid:                     mercury.ObsResult[*big.Int]{Val: big.NewInt(70)},
		CurrentBlockNum:         mercury.ObsResult[int64]{Val: 80},
		CurrentBlockHash:        mercury.ObsResult[[]byte]{Val: []byte("mercury v1 test block hash")},
		CurrentBlockTimestamp:   mercury.ObsResult[uint64]{Val: 90},
		LatestBlocks:            []mercury_v1_types.Block{{Num: 100, Hash: "fakehash", Ts: 101}, {Num: 102, Hash: "fakehash2", Ts: 103}},
		MaxFinalizedBlockNumber: mercury.ObsResult[int64]{Val: 79},
	},
}
View Source
var ReportCodec = staticReportCodec{}

Functions

This section is empty.

Types

type Parameters

type Parameters struct {
	// ReportCodec
	Report          ocr2plus_types.Report
	ReportFields    mercury_v1_types.ReportFields
	MaxReportLength int
	CurrentBlockNum int64

	// DataSource
	ReportTimestamp ocr2plus_types.ReportTimestamp
	Observation     mercury_v1_types.Observation
}

Jump to

Keyboard shortcuts

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