-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
279 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
pragma solidity >=0.5.0 <0.6.0; | ||
|
||
interface IV1PoolOracle { | ||
function read(uint256 price, uint256 timestamp) external view returns( | ||
uint256, | ||
uint256, | ||
uint256, | ||
uint256, | ||
uint256, | ||
uint256 | ||
); | ||
function read(uint256 price, uint256 timestamp) | ||
external | ||
view | ||
returns ( | ||
uint256, | ||
uint256, | ||
uint256, | ||
uint256, | ||
uint256, | ||
uint256 | ||
); | ||
|
||
function latestAnswer() external view returns (uint256); | ||
function liquidityPool() external view returns (address); | ||
} | ||
|
||
interface ILiquidityPoolV1Converter { | ||
function reserveTokens(uint256 index) external view returns (address); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
pragma solidity 0.5.17; | ||
|
||
import "../interfaces/IERC20.sol"; | ||
|
||
contract LiquidityPoolV1ConverterMockup { | ||
IERC20[] public reserveTokens; | ||
|
||
constructor(IERC20 _token0, IERC20 _token1) public { | ||
reserveTokens.push(_token0); | ||
reserveTokens.push(_token1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
pragma solidity 0.5.17; | ||
|
||
contract PriceFeedV1PoolOracleMockup { | ||
uint256 value; | ||
uint256 value; | ||
address public liquidityPool; | ||
|
||
constructor(uint256 _value) public { | ||
value = _value; | ||
} | ||
constructor(uint256 _value, address _liquidityPool) public { | ||
value = _value; | ||
liquidityPool = _liquidityPool; | ||
} | ||
|
||
function latestAnswer() external view returns (uint256) { | ||
return value; | ||
function latestAnswer() external view returns (uint256) { | ||
return value; | ||
} | ||
|
||
function setValue(uint256 _value) public { | ||
function setValue(uint256 _value) public { | ||
value = _value; | ||
} | ||
} | ||
|
||
function setLiquidityPool(address _liquidityPool) public { | ||
liquidityPool = _liquidityPool; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters