Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Grimal committed Apr 9, 2024
1 parent 14c4d58 commit 2eb12ee
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 10 deletions.
11 changes: 10 additions & 1 deletion test/MorphoChainlinkOracleV2Test.sol
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,16 @@ contract MorphoChainlinkOracleV2Test is Test {
price = bound(price, type(int256).min, -1);
ChainlinkAggregatorMock aggregator = new ChainlinkAggregatorMock();
MorphoChainlinkOracleV2 oracle = new MorphoChainlinkOracleV2(
vaultZero, 1, MinimalAggregatorV3Interface(address(aggregator)), feedZero, 18, vaultZero, 1, feedZero, feedZero, 0
vaultZero,
1,
MinimalAggregatorV3Interface(address(aggregator)),
feedZero,
18,
vaultZero,
1,
feedZero,
feedZero,
0
);
aggregator.setAnwser(price);
vm.expectRevert(bytes(ErrorsLib.NEGATIVE_ANSWER));
Expand Down
11 changes: 10 additions & 1 deletion test/WstEthStEthExchangeRateChainlinkAdapterTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,16 @@ contract WstEthStEthExchangeRateChainlinkAdapterTest is Test {
require(block.chainid == 1, "chain isn't Ethereum");
adapter = new WstEthStEthExchangeRateChainlinkAdapter();
morphoOracle = new MorphoChainlinkOracleV2(
vaultZero, 1, MinimalAggregatorV3Interface(address(adapter)), feedZero, 18, vaultZero, 1, feedZero, feedZero, 18
vaultZero,
1,
MinimalAggregatorV3Interface(address(adapter)),
feedZero,
18,
vaultZero,
1,
feedZero,
feedZero,
18
);
}

Expand Down
24 changes: 16 additions & 8 deletions test/helpers/Constants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,29 @@ import {MinimalAggregatorV3Interface} from "../../src/interfaces/MinimalAggregat

MinimalAggregatorV3Interface constant feedZero = MinimalAggregatorV3Interface(address(0));
// 8 decimals of precision
MinimalAggregatorV3Interface constant btcUsdFeed = MinimalAggregatorV3Interface(0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c);
MinimalAggregatorV3Interface constant btcUsdFeed =
MinimalAggregatorV3Interface(0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c);
// 8 decimals of precision
MinimalAggregatorV3Interface constant usdcUsdFeed = MinimalAggregatorV3Interface(0x8fFfFfd4AfB6115b954Bd326cbe7B4BA576818f6);
MinimalAggregatorV3Interface constant usdcUsdFeed =
MinimalAggregatorV3Interface(0x8fFfFfd4AfB6115b954Bd326cbe7B4BA576818f6);
// 18 decimals of precision
MinimalAggregatorV3Interface constant btcEthFeed = MinimalAggregatorV3Interface(0xdeb288F737066589598e9214E782fa5A8eD689e8);
MinimalAggregatorV3Interface constant btcEthFeed =
MinimalAggregatorV3Interface(0xdeb288F737066589598e9214E782fa5A8eD689e8);
// 8 decimals of precision
MinimalAggregatorV3Interface constant wBtcBtcFeed = MinimalAggregatorV3Interface(0xfdFD9C85aD200c506Cf9e21F1FD8dd01932FBB23);
MinimalAggregatorV3Interface constant wBtcBtcFeed =
MinimalAggregatorV3Interface(0xfdFD9C85aD200c506Cf9e21F1FD8dd01932FBB23);
// 18 decimals of precision
MinimalAggregatorV3Interface constant stEthEthFeed = MinimalAggregatorV3Interface(0x86392dC19c0b719886221c78AB11eb8Cf5c52812);
MinimalAggregatorV3Interface constant stEthEthFeed =
MinimalAggregatorV3Interface(0x86392dC19c0b719886221c78AB11eb8Cf5c52812);
// 18 decimals of precision
MinimalAggregatorV3Interface constant usdcEthFeed = MinimalAggregatorV3Interface(0x986b5E1e1755e3C2440e960477f25201B0a8bbD4);
MinimalAggregatorV3Interface constant usdcEthFeed =
MinimalAggregatorV3Interface(0x986b5E1e1755e3C2440e960477f25201B0a8bbD4);
// 8 decimals of precision
MinimalAggregatorV3Interface constant ethUsdFeed = MinimalAggregatorV3Interface(0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419);
MinimalAggregatorV3Interface constant ethUsdFeed =
MinimalAggregatorV3Interface(0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419);
// 18 decimals of precision
MinimalAggregatorV3Interface constant daiEthFeed = MinimalAggregatorV3Interface(0x773616E4d11A78F511299002da57A0a94577F1f4);
MinimalAggregatorV3Interface constant daiEthFeed =
MinimalAggregatorV3Interface(0x773616E4d11A78F511299002da57A0a94577F1f4);

IERC4626 constant vaultZero = IERC4626(address(0));
IERC4626 constant sDaiVault = IERC4626(0x83F20F44975D03b1b09e64809B757c47f942BEeA);
Expand Down

0 comments on commit 2eb12ee

Please sign in to comment.