@@ -4,17 +4,17 @@ pragma solidity ^0.8.0;
4
4
import "./helpers/Constants.sol " ;
5
5
import "../lib/forge-std/src/Test.sol " ;
6
6
import {ChainlinkOracle} from "../src/morpho-chainlink-v1/ChainlinkOracle.sol " ;
7
- import "../src/wsteth-exchange-rate-adapter/WstEthEthExchangeRateChainlinkAdapter .sol " ;
7
+ import "../src/wsteth-exchange-rate-adapter/WstEthStEthExchangeRateChainlinkAdapter .sol " ;
8
8
9
- contract WstEthEthExchangeRateChainlinkAdapterTest is Test {
9
+ contract WstEthStEthExchangeRateChainlinkAdapterTest is Test {
10
10
IStEth internal constant ST_ETH = IStEth (0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84 );
11
11
12
- WstEthEthExchangeRateChainlinkAdapter internal oracle;
12
+ WstEthStEthExchangeRateChainlinkAdapter internal oracle;
13
13
ChainlinkOracle internal chainlinkOracle;
14
14
15
15
function setUp () public {
16
16
vm.createSelectFork (vm.envString ("ETH_RPC_URL " ));
17
- oracle = new WstEthEthExchangeRateChainlinkAdapter ();
17
+ oracle = new WstEthStEthExchangeRateChainlinkAdapter ();
18
18
chainlinkOracle = new ChainlinkOracle (
19
19
vaultZero, AggregatorV3Interface (address (oracle)), feedZero, feedZero, feedZero, 1 , 18 , 18
20
20
);
@@ -25,7 +25,7 @@ contract WstEthEthExchangeRateChainlinkAdapterTest is Test {
25
25
}
26
26
27
27
function testDescription () public {
28
- assertEq (oracle.description (), "wstETH/ETH exchange rate " );
28
+ assertEq (oracle.description (), "wstETH/stETH exchange rate " );
29
29
}
30
30
31
31
function testLatestRoundData () public {
@@ -44,7 +44,7 @@ contract WstEthEthExchangeRateChainlinkAdapterTest is Test {
44
44
assertLe (uint256 (answer), 1.5e18 ); // Max bounds of the exchange rate. Should work for a long enough time.
45
45
}
46
46
47
- function testOracleWstEthEthExchangeRate () public {
47
+ function testOracleWstEthStEthExchangeRate () public {
48
48
(, int256 expectedPrice ,,,) = oracle.latestRoundData ();
49
49
assertEq (chainlinkOracle.price (), uint256 (expectedPrice) * 10 ** (36 + 18 - 18 - 18 ));
50
50
}
0 commit comments