API Version: v0.3.1

MockReportGenerator v0.3.1 API Reference

MockReportGenerator

A contract that generates signed Data Streams reports for local testing.

MockReportGenerator

Errors

MockReportGenerator__InvalidBid

error MockReportGenerator__InvalidBid()

MockReportGenerator__InvalidAsk

error MockReportGenerator__InvalidAsk()

MockReportGenerator__CastOverflow

error MockReportGenerator__CastOverflow()

Functions

constructor

Initializes the generator with an initial price.

constructor(int192 initialPrice)

Parameters

ParameterTypeDescription
initialPriceint192The initial report price

generateReportV1..V13

Generates a signed report for a specific schema version.

function generateReportV3() external returns (bytes memory signedReport, ReportV3 memory report)

Returns

ParameterTypeDescription
signedReportbytesThe ABI-encoded signed report
reportReportVnThe generated report struct

updatePrice

Updates the price used in generated reports.

function updatePrice(int192 price) public

updatePriceBidAndAsk

Updates the price, bid and ask used in generated reports.

function updatePriceBidAndAsk(int192 price, int192 bid, int192 ask) external

updateExpiresPeriod

Updates the report expiry period.

function updateExpiresPeriod(uint32 period) external

updateMarketStatus

Updates the market status used in generated reports.

function updateMarketStatus(uint32 status) external

updateFees

Updates the native and LINK fees carried in generated reports.

function updateFees(uint192 nativeFee, uint192 linkFee) external

Get the latest Chainlink content straight to your inbox.