@@ -16,31 +16,20 @@ contract WstEthChainlinkAdapterTest is Test {
16
16
oracle = new WstEthChainlinkAdapter (address (ST_ETH));
17
17
}
18
18
19
- function testLatestRoundDataOverflow (uint256 ethByShares ) public {
20
- ethByShares = bound (ethByShares, uint256 (type (int256 ).max) + 1 , type (uint256 ).max);
21
-
22
- vm.mockCall (
23
- address (ST_ETH),
24
- abi.encodeWithSelector (ST_ETH.getPooledEthByShares.selector , 10 ** 18 ),
25
- abi.encode (ethByShares)
26
- );
27
- vm.expectRevert (bytes (ErrorsLib.OVERFLOW));
28
- oracle.latestRoundData ();
29
- }
30
-
31
19
function testDecimals () public {
32
20
assertEq (oracle.decimals (), uint8 (18 ));
33
21
}
34
22
23
+ function testDescription () public {
24
+ assertEq (oracle.description (), "wstETH/ETH exchange rate " );
25
+ }
26
+
27
+
35
28
function testDeployZeroAddress () public {
36
29
vm.expectRevert (bytes (ErrorsLib.ZERO_ADDRESS));
37
30
new WstEthChainlinkAdapter (address (0 ));
38
31
}
39
32
40
- function testDescription () public {
41
- assertEq (oracle.description (), "wstETH/ETH exchange rate " );
42
- }
43
-
44
33
function testReverts () public {
45
34
vm.expectRevert ();
46
35
oracle.version ();
@@ -59,19 +48,6 @@ contract WstEthChainlinkAdapterTest is Test {
59
48
assertEq (answeredInRound, 0 );
60
49
}
61
50
62
- function testLatestRoundDataNoOverflow (uint256 ethByShares ) public {
63
- ethByShares = bound (ethByShares, 0 , uint256 (type (int256 ).max));
64
-
65
- vm.mockCall (
66
- address (ST_ETH),
67
- abi.encodeWithSelector (ST_ETH.getPooledEthByShares.selector , 10 ** 18 ),
68
- abi.encode (ethByShares)
69
- );
70
-
71
- (, int256 answer ,,,) = oracle.latestRoundData ();
72
- assertEq (uint256 (answer), ethByShares);
73
- }
74
-
75
51
function testLatestRoundDataBounds () public {
76
52
(, int256 answer ,,,) = oracle.latestRoundData ();
77
53
assertGe (uint256 (answer), 1154690031824824994 ); // Exchange rate queried at block 19070943
0 commit comments