2020-05-29 16:45:37 +00:00
|
|
|
// SPDX-License-Identifier: agpl-3.0
|
|
|
|
pragma solidity ^0.6.8;
|
|
|
|
|
2020-07-13 08:54:08 +00:00
|
|
|
contract MockAggregator {
|
|
|
|
int256 private _latestAnswer;
|
2020-05-29 16:45:37 +00:00
|
|
|
|
2020-07-13 08:54:08 +00:00
|
|
|
event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 timestamp);
|
2020-05-29 16:45:37 +00:00
|
|
|
|
2020-07-13 08:54:08 +00:00
|
|
|
constructor(int256 _initialAnswer) public {
|
|
|
|
_latestAnswer = _initialAnswer;
|
|
|
|
emit AnswerUpdated(_initialAnswer, 0, now);
|
|
|
|
}
|
2020-05-29 16:45:37 +00:00
|
|
|
|
2020-07-13 08:54:08 +00:00
|
|
|
function latestAnswer() external view returns (int256) {
|
|
|
|
return _latestAnswer;
|
|
|
|
}
|
|
|
|
}
|