Skip to content

Commit

Permalink
use missing assets for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kyzia551 committed Jan 17, 2024
1 parent a9e0e44 commit 767d51c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
7 changes: 7 additions & 0 deletions src/lib/MissingAssetsMainnet.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

library MissingAssetsMainnet {
address constant public RETH = 0xae78736Cd615f374D3085123A210448E74Fc6393;
address constant public STETH = 0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84;
}
7 changes: 4 additions & 3 deletions tests/RETHPriceCapAdapterTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ pragma solidity ^0.8.0;
import {Test} from 'forge-std/Test.sol';

import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol';
import {RETHPriceCapAdapter} from '../src/contracts/RETHPriceCapAdapter.sol';
import {BaseAggregatorsMainnet} from 'cl-synchronicity-price-adapter/lib/BaseAggregators.sol';
import {RETHPriceCapAdapter} from '../src/contracts/RETHPriceCapAdapter.sol';
import {MissingAssetsMainnet} from '../src/lib/MissingAssetsMainnet.sol';

contract RETHPriceCapAdapterTest is Test {
function setUp() public {
Expand All @@ -16,7 +17,7 @@ contract RETHPriceCapAdapterTest is Test {
RETHPriceCapAdapter adapter = new RETHPriceCapAdapter(
AaveV3Ethereum.ACL_MANAGER,
BaseAggregatorsMainnet.ETH_USD_AGGREGATOR,
BaseAggregatorsMainnet.RETH,
MissingAssetsMainnet.RETH,
'rETH / ETH / USD',
1093801647000000000,
1703743921,
Expand All @@ -36,7 +37,7 @@ contract RETHPriceCapAdapterTest is Test {
RETHPriceCapAdapter adapter = new RETHPriceCapAdapter(
AaveV3Ethereum.ACL_MANAGER,
BaseAggregatorsMainnet.ETH_USD_AGGREGATOR,
BaseAggregatorsMainnet.RETH,
MissingAssetsMainnet.RETH,
'rETH / ETH / USD',
1093801647000000000,
1703743921,
Expand Down
12 changes: 7 additions & 5 deletions tests/WstETHPriceCapAdapterTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ pragma solidity ^0.8.0;
import {Test} from 'forge-std/Test.sol';

import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol';
import {WstETHPriceCapAdapter} from '../src/contracts/WstETHPriceCapAdapter.sol';
import {BaseAggregatorsMainnet} from 'cl-synchronicity-price-adapter/lib/BaseAggregators.sol';

import {WstETHPriceCapAdapter} from '../src/contracts/WstETHPriceCapAdapter.sol';
import {MissingAssetsMainnet} from '../src/lib/MissingAssetsMainnet.sol';

contract WstETHPriceCapAdapterTest is Test {
function setUp() public {
vm.createSelectFork(vm.rpcUrl('mainnet'), 18961286);
Expand All @@ -16,7 +18,7 @@ contract WstETHPriceCapAdapterTest is Test {
WstETHPriceCapAdapter adapter = new WstETHPriceCapAdapter(
AaveV3Ethereum.ACL_MANAGER,
BaseAggregatorsMainnet.ETH_USD_AGGREGATOR,
BaseAggregatorsMainnet.STETH,
MissingAssetsMainnet.STETH,
'wstETH/stETH/USD',
1151642949000000000,
1703743921,
Expand All @@ -36,7 +38,7 @@ contract WstETHPriceCapAdapterTest is Test {
WstETHPriceCapAdapter adapter = new WstETHPriceCapAdapter(
AaveV3Ethereum.ACL_MANAGER,
BaseAggregatorsMainnet.ETH_USD_AGGREGATOR,
BaseAggregatorsMainnet.STETH,
MissingAssetsMainnet.STETH,
'wstETH/stETH/USD',
1151642949000000000,
1703743921,
Expand All @@ -56,7 +58,7 @@ contract WstETHPriceCapAdapterTest is Test {
WstETHPriceCapAdapter adapter = new WstETHPriceCapAdapter(
AaveV3Ethereum.ACL_MANAGER,
BaseAggregatorsMainnet.ETH_USD_AGGREGATOR,
BaseAggregatorsMainnet.STETH,
MissingAssetsMainnet.STETH,
'wstETH/stETH/USD',
1151642949000000000,
1703743921,
Expand Down Expand Up @@ -87,7 +89,7 @@ contract WstETHPriceCapAdapterTest is Test {
WstETHPriceCapAdapter adapter = new WstETHPriceCapAdapter(
AaveV3Ethereum.ACL_MANAGER,
BaseAggregatorsMainnet.ETH_USD_AGGREGATOR,
BaseAggregatorsMainnet.STETH,
MissingAssetsMainnet.STETH,
'wstETH/stETH/USD',
1151642949000000000,
1703743921,
Expand Down

0 comments on commit 767d51c

Please sign in to comment.