Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
MathisGD committed Feb 18, 2024
1 parent a4b964c commit bf37d41
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 31 deletions.
28 changes: 14 additions & 14 deletions src/morpho-chainlink-v1/interfaces/AggregatorV3Interface.sol
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;
pragma solidity >=0.5.0;

/// @dev From
/// https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol
interface AggregatorV3Interface {
function decimals() external view returns (uint8);
/// @dev From
/// https://github.com/smartcontractkit/chainlink/blob/master/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol
interface AggregatorV3Interface {
function decimals() external view returns (uint8);

function description() external view returns (string memory);
function description() external view returns (string memory);

function version() external view returns (uint256);
function version() external view returns (uint256);

function getRoundData(uint80 _roundId)
external
view
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
function getRoundData(uint80 _roundId)
external
view
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);

function latestRoundData()
external
view
function latestRoundData()
external
view
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
}
4 changes: 3 additions & 1 deletion test/WstEthEthExchangeRateChainlinkAdapterTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ contract WstEthEthExchangeRateChainlinkAdapterTest is Test {
function setUp() public {
vm.createSelectFork(vm.envString("ETH_RPC_URL"));
oracle = new WstEthEthExchangeRateChainlinkAdapter(address(WST_ETH));
chainlinkOracle = new ChainlinkOracle(vaultZero, AggregatorV3Interface(address(oracle)), feedZero, feedZero, feedZero, 1, 18, 18);
chainlinkOracle = new ChainlinkOracle(
vaultZero, AggregatorV3Interface(address(oracle)), feedZero, feedZero, feedZero, 1, 18, 18
);
}

function testDecimals() public {
Expand Down
24 changes: 8 additions & 16 deletions test/helpers/Constants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,21 @@ import {IERC4626, AggregatorV3Interface} from "../../src/morpho-chainlink-v1/Cha

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

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

0 comments on commit bf37d41

Please sign in to comment.