MockOffchainAggregator.sol API

API Methods

[MockOffchainAggregator].minAnswer()

function minAnswer() public view returns(int192);

Returns the minimum answer for this feed. If the returned value is 1 that means that there is no minimum answer set for this feed. On most data feeds, these values are no longer used.

Return values:

  • minAnswer (int192): The minimum answer for this feed.


[MockOffchainAggregator].maxAnswer()

function maxAnswer() public view returns(int192);

Returns the maximum answer for this feed. If the returned value is 95780971304118053647396689196894323976171195136475135 (type(uint176).max) that means that there is no maximum answer set for this feed. On most data feeds, these values are no longer used.

Return values:

  • maxAnswer (int192): The maximum answer for this feed.


[MockOffchainAggregator].updateMinAndMaxAnswers(int192 _minAnswer, int192 _maxAnswer)

function updateMinAndMaxAnswers(int192 _minAnswer, int192 _maxAnswer) external;

Sets the minimum and maximum answer of the mock feed. Used only for mock purposes, not available on actual on-chain feeds. Reverts if _minAnswer is less than 1 and if _maxAnswer is greater than 95780971304118053647396689196894323976171195136475135 (type(uint176).max).

Parameters:

  • _minAnswer (int192): The new minimum answer for this feed.

  • _maxAnswer (int192): The new maximum answer for this feed.

Last updated