Skip to main content

MockOracleAncillary

MockOracleAncillary#

Functions#

constructor(address _finderAddress, address _timerAddress) (public)
requestPrice(bytes32 identifier, uint256 time, bytes ancillaryData) (public)
pushPrice(bytes32 identifier, uint256 time, bytes ancillaryData, int256 price) (external)
hasPrice(bytes32 identifier, uint256 time, bytes ancillaryData) โ†’ bool (public)
getPrice(bytes32 identifier, uint256 time, bytes ancillaryData) โ†’ int256 (public)
getPendingQueries() โ†’ struct MockOracleAncillary.QueryPoint[] (external)
setCurrentTime(uint256 time) (external)

Sets the current time.

Will revert if not running in test mode.

Parameters:#

  • time: timestamp to set current Testable time to.
getCurrentTime() โ†’ uint256 (public)

Gets the current time. Will return the last time set in setCurrentTime if running in test mode. Otherwise, it will return the block timestamp.

Events#

PriceRequestAdded(address requester, bytes32 identifier, uint256 time, bytes ancillaryData)
PushedPrice(address pusher, bytes32 identifier, uint256 time, bytes ancillaryData, int256 price)

Modifiers#

onlyIfTest()

Reverts if not running in test mode.