MockOracle
MockOracle#
Functions#
constructor(address _finderAddress, address _timerAddress) (public)requestPrice(bytes32 identifier, uint256 time) (public)pushPrice(bytes32 identifier, uint256 time, int256 price) (external)hasPrice(bytes32 identifier, uint256 time) โ bool (public)getPrice(bytes32 identifier, uint256 time) โ int256 (public)getPendingQueries() โ struct MockOracle.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.
Modifiers#
onlyIfTest()Reverts if not running in test mode.