Skip to content

Commit

Permalink
Remove duplicate variable in tests (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunbreak1211 authored Sep 5, 2024
1 parent 95431f3 commit 2697dc8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions test/FlapperUniV2.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ contract FlapperUniV2Test is DssTest {
address PAUSE_PROXY;
VatLike vat;
VowLike vow;
SpotterLike spotter;

address constant LOG = 0xdA0Ab1e0017DEbCd72Be8599041a2aa3bA7e740F;

Expand All @@ -120,7 +119,6 @@ contract FlapperUniV2Test is DssTest {
PAUSE_PROXY = ChainlogLike(LOG).getAddress("MCD_PAUSE_PROXY");
vat = VatLike(ChainlogLike(LOG).getAddress("MCD_VAT"));
vow = VowLike(ChainlogLike(LOG).getAddress("MCD_VOW"));
spotter = SpotterLike(ChainlogLike(LOG).getAddress("MCD_SPOT"));

splitter = new SplitterMock(DAI_JOIN);
vm.startPrank(PAUSE_PROXY);
Expand Down Expand Up @@ -212,7 +210,7 @@ contract FlapperUniV2Test is DssTest {
}

function refAmountOut(uint256 amountIn, address pip) internal view returns (uint256) {
return amountIn * WAD / (uint256(MockMedianizer(pip).read()) * RAY / spotter.par());
return amountIn * WAD / (uint256(MockMedianizer(pip).read()) * RAY / SpotterLike(SPOT).par());
}

function uniV2GemForDai(uint256 amountIn, address gem) internal view returns (uint256 amountOut) {
Expand Down
4 changes: 1 addition & 3 deletions test/FlapperUniV2SwapOnly.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ contract FlapperUniV2SwapOnlyTest is DssTest {
address PAUSE_PROXY;
VatLike vat;
VowLike vow;
SpotterLike spotter;

address constant LOG = 0xdA0Ab1e0017DEbCd72Be8599041a2aa3bA7e740F;

Expand All @@ -118,7 +117,6 @@ contract FlapperUniV2SwapOnlyTest is DssTest {
PAUSE_PROXY = ChainlogLike(LOG).getAddress("MCD_PAUSE_PROXY");
vat = VatLike(ChainlogLike(LOG).getAddress("MCD_VAT"));
vow = VowLike(ChainlogLike(LOG).getAddress("MCD_VOW"));
spotter = SpotterLike(ChainlogLike(LOG).getAddress("MCD_SPOT"));

splitter = new SplitterMock(DAI_JOIN);
vm.startPrank(PAUSE_PROXY);
Expand Down Expand Up @@ -206,7 +204,7 @@ contract FlapperUniV2SwapOnlyTest is DssTest {
}

function refAmountOut(uint256 amountIn, address pip) internal view returns (uint256) {
return amountIn * WAD / (uint256(MockMedianizer(pip).read()) * RAY / spotter.par());
return amountIn * WAD / (uint256(MockMedianizer(pip).read()) * RAY / SpotterLike(SPOT).par());
}

function uniV2GemForDai(uint256 amountIn, address gem) internal view returns (uint256 amountOut) {
Expand Down

0 comments on commit 2697dc8

Please sign in to comment.