-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathUniswapV2OracleMock.sol
39 lines (30 loc) · 1.08 KB
/
UniswapV2OracleMock.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// SPDX-License-Identifier: MIT
// solhint-disable
pragma solidity ^0.8.21;
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import {AUniswapV2Oracle} from "../../../oracles/AUniswapV2Oracle.sol";
contract UniswapV2OracleMock is AUniswapV2Oracle {
using EnumerableSet for EnumerableSet.AddressSet;
function __OracleV2Mock_init(
address uniswapV2Factory_,
uint256 timeWindow_
) external initializer {
__AUniswapV2Oracle_init(uniswapV2Factory_, timeWindow_);
}
function mockInit(address uniswapV2Factory_, uint256 timeWindow_) external {
__AUniswapV2Oracle_init(uniswapV2Factory_, timeWindow_);
}
function addPaths(address[][] calldata paths_) external {
_addPaths(paths_);
}
function removePaths(address[] calldata tokenIns_) external {
_removePaths(tokenIns_);
}
function setTimeWindow(uint256 newTimeWindow_) external {
_setTimeWindow(newTimeWindow_);
}
function doubleUpdatePrice() external {
updatePrices();
updatePrices();
}
}