Chainlink Local - Documentation
  • 💻Getting Started
    • Chainlink Local - Documentation
    • Architecture
  • 📖API Reference
    • API Reference
    • CCIPLocalSimulator.sol API
    • CCIPLocalSimulatorFork.sol API
    • CCIPLocalSimulatorFork.js API
    • MockV3Aggregator.sol API
    • MockOffchainAggregator.sol API
  • Guides
    • CCIPLocalSimulator.sol - usage with Foundry, Hardhat & Remix IDE
    • CCIPLocalSimulatorFork.sol - usage with Foundry
    • CCIPLocalSimulatorFork.js - usage with Hardhat
  • 🧑‍💻Learn more
    • Examples
    • Contribute to Chainlink Local
Powered by GitBook
On this page
  • API Methods
  • [MockOffchainAggregator].minAnswer()
  • [MockOffchainAggregator].maxAnswer()
  • [MockOffchainAggregator].updateMinAndMaxAnswers(int192 _minAnswer, int192 _maxAnswer)
  1. API Reference

MockOffchainAggregator.sol API

PreviousMockV3Aggregator.sol APINextCCIPLocalSimulator.sol - usage with Foundry, Hardhat & Remix IDE

Last updated 11 months ago

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.

📖
minAnswer()
maxAnswer()
updateMinAndMaxAnswers(int192 _minAnswer, int192 _maxAnswer)