aave-protocol-v2/contracts/mocks/oracle/CLAggregators/MockAggregator.sol

27 lines
747 B
Solidity
Raw Normal View History

// SPDX-License-Identifier: agpl-3.0
2020-11-20 10:45:20 +00:00
pragma solidity 0.6.12;
2020-07-13 08:54:08 +00:00
contract MockAggregator {
int256 private _latestAnswer;
2020-07-13 08:54:08 +00:00
event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 timestamp);
2020-07-13 08:54:08 +00:00
constructor(int256 _initialAnswer) public {
_latestAnswer = _initialAnswer;
emit AnswerUpdated(_initialAnswer, 0, now);
}
2020-07-13 08:54:08 +00:00
function latestAnswer() external view returns (int256) {
return _latestAnswer;
}
2020-10-20 10:54:17 +00:00
function getTokenType() external view returns (uint256) {
return 1;
}
// function getSubTokens() external view returns (address[] memory) {
2020-10-20 13:19:41 +00:00
// TODO: implement mock for when multiple subtokens. Maybe we need to create diff mock contract
// to call it from the migration for this case??
2020-10-20 10:54:17 +00:00
// }
2020-07-13 08:54:08 +00:00
}