Skip to content

Commit

Permalink
Fix ovlWethToken in construct
Browse files Browse the repository at this point in the history
  • Loading branch information
sicknick99 committed Feb 11, 2022
1 parent 9ec5c5e commit ab7a423
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions contracts/feeds/balancerv2/OverlayV1BalancerV2Feed.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ contract OverlayV1BalancerV2Feed is OverlayV1Feed {
address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address private immutable VAULT;

// address public immutable marketPool;
// address public immutable ovlWethPool;
// address public immutable ovl;
address public immutable marketPool;
address public immutable ovlWethPool;
address public immutable ovl;

address public immutable marketToken0;
address public immutable marketToken1;

// address public immutable ovlWethToken0;
// address public immutable ovlWethToken1;
address public immutable ovlWethToken0;
address public immutable ovlWethToken1;

address public immutable marketBaseToken;
address public immutable marketQuoteToken;
Expand Down Expand Up @@ -64,23 +64,23 @@ contract OverlayV1BalancerV2Feed is OverlayV1Feed {
(IERC20[] memory ovlWethTokens, , ) = getPoolTokensData(balancerV2Tokens.ovlWethPoolId);
// TODO: verify token ordering
// need OVL/WETH pool for ovl vs ETH price to make reserve conversion from ETH => OVL
address _ovlWethToken0 = address(marketTokens[0]);
address _ovlWethToken1 = address(marketTokens[1]);

// require(
// _ovlWethToken0 == WETH || _ovlWethToken1 == WETH,
// "OVLV1Feed: ovlWethToken != WETH"
// );
// require(
// _ovlWethToken0 == _ovl || _ovlWethToken1 == _ovl,
// "OVLV1Feed: ovlWethToken != OVL"
// );
// ovlWethToken0 = _ovlWethToken0;
// ovlWethToken1 = _ovlWethToken1;
//
// marketPool = _marketPool;
// ovlWethPool = _ovlWethPool;
// ovl = _ovl;
address _ovlWethToken0 = address(ovlWethTokens[0]);
address _ovlWethToken1 = address(ovlWethTokens[1]);

require(
_ovlWethToken0 == WETH || _ovlWethToken1 == WETH,
"OVLV1Feed: ovlWethToken != WETH"
);
require(
_ovlWethToken0 == _ovl || _ovlWethToken1 == _ovl,
"OVLV1Feed: ovlWethToken != OVL"
);
ovlWethToken0 = _ovlWethToken0;
ovlWethToken1 = _ovlWethToken1;

marketPool = _marketPool;
ovlWethPool = _ovlWethPool;
ovl = _ovl;
}

function getPoolTokensData(bytes32 balancerV2PoolId)
Expand Down

0 comments on commit ab7a423

Please sign in to comment.