Skip to content

Commit f7488af

Browse files
committed
fix: resolve tests
1 parent 67d30fc commit f7488af

File tree

5 files changed

+30
-27
lines changed

5 files changed

+30
-27
lines changed
Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// SPDX-License-Identifier: BUSL-1.1
22
pragma solidity ^0.8.0;
33

4-
import {AaveV3EthereumHorizonCustom} from 'tests/horizon/utils/AaveV3EthereumHorizonCustom.sol';
5-
import {AaveV3EthereumHorizon, AaveV3EthereumHorizonAssets} from 'aave-address-book/AaveV3EthereumHorizon.sol';
4+
import {AaveV3HorizonEthereum} from 'tests/horizon/utils/AaveV3HorizonEthereum.sol';
65
import {HorizonPhaseTwoListing} from 'src/deployments/inputs/HorizonPhaseTwoListing.sol';
76
import {AaveV3HelpersBatchOne} from 'src/deployments/projects/aave-v3-batched/batches/AaveV3HelpersBatchOne.sol';
87
import {AaveV3ConfigEngine} from 'src/contracts/extensions/v3-config-engine/AaveV3ConfigEngine.sol';
@@ -12,21 +11,21 @@ contract DeployHorizonPhaseTwoPayload is Script {
1211
function run() public returns (address, address) {
1312
vm.startBroadcast();
1413
AaveV3HelpersBatchOne helpersBatchOne = new AaveV3HelpersBatchOne(
15-
address(AaveV3EthereumHorizon.POOL),
16-
address(AaveV3EthereumHorizon.POOL_CONFIGURATOR),
17-
address(AaveV3EthereumHorizonAssets.GHO_INTEREST_RATE_STRATEGY),
18-
address(AaveV3EthereumHorizon.ORACLE),
19-
address(AaveV3EthereumHorizon.DEFAULT_INCENTIVES_CONTROLLER),
20-
address(AaveV3EthereumHorizon.COLLECTOR),
21-
address(AaveV3EthereumHorizon.DEFAULT_A_TOKEN_IMPL),
22-
address(AaveV3EthereumHorizon.DEFAULT_VARIABLE_DEBT_TOKEN_IMPL)
14+
AaveV3HorizonEthereum.POOL,
15+
AaveV3HorizonEthereum.POOL_CONFIGURATOR,
16+
AaveV3HorizonEthereum.DEFAULT_INTEREST_RATE_STRATEGY,
17+
AaveV3HorizonEthereum.AAVE_ORACLE,
18+
AaveV3HorizonEthereum.REWARDS_CONTROLLER,
19+
AaveV3HorizonEthereum.REVENUE_SPLITTER,
20+
AaveV3HorizonEthereum.ATOKEN_IMPLEMENTATION,
21+
AaveV3HorizonEthereum.VARIABLE_DEBT_TOKEN_IMPLEMENTATION
2322
);
2423

25-
address configEngine = helpersBatchOne.getConfigEngineReport().configEngine;
26-
27-
HorizonPhaseTwoListing horizonPhaseTwoListing = new HorizonPhaseTwoListing(configEngine);
24+
HorizonPhaseTwoListing horizonPhaseTwoListing = new HorizonPhaseTwoListing(
25+
helpersBatchOne.getConfigEngineReport().configEngine
26+
);
2827
vm.stopBroadcast();
2928

30-
return (configEngine, address(horizonPhaseTwoListing));
29+
return (address(helpersBatchOne), address(horizonPhaseTwoListing));
3130
}
3231
}

src/deployments/inputs/HorizonPhaseTwoListing.sol

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {IAaveV3ConfigEngine as IEngine} from '../../contracts/extensions/v3-conf
55
import {EngineFlags} from '../../contracts/extensions/v3-config-engine/EngineFlags.sol';
66
import {AaveV3Payload} from '../../contracts/extensions/v3-config-engine/AaveV3Payload.sol';
77

8-
import {AaveV3EthereumHorizon, AaveV3EthereumHorizonAssets} from 'aave-address-book/AaveV3EthereumHorizon.sol';
98
import {AaveV3EthereumHorizonCustom} from 'tests/horizon/utils/AaveV3EthereumHorizonCustom.sol';
109

1110
contract HorizonPhaseTwoListing is AaveV3Payload {
@@ -65,7 +64,7 @@ contract HorizonPhaseTwoListing is AaveV3Payload {
6564
}),
6665
IEngine.TokenImplementations({
6766
aToken: AaveV3EthereumHorizonCustom.RWA_ATOKEN_IMPLEMENTATION,
68-
vToken: AaveV3EthereumHorizon.DEFAULT_VARIABLE_DEBT_TOKEN_IMPL
67+
vToken: AaveV3EthereumHorizonCustom.VARIABLE_DEBT_TOKEN_IMPLEMENTATION
6968
})
7069
);
7170

@@ -85,7 +84,7 @@ contract HorizonPhaseTwoListing is AaveV3Payload {
8584
borrowable: EngineFlags.DISABLED
8685
});
8786
assetsEMode[index++] = IEngine.AssetEModeUpdate({
88-
asset: AaveV3EthereumHorizonAssets.GHO_UNDERLYING,
87+
asset: AaveV3EthereumHorizonCustom.GHO_UNDERLYING,
8988
eModeCategory: 1,
9089
collateral: EngineFlags.DISABLED,
9190
borrowable: EngineFlags.ENABLED

tests/deployments/HorizonBase.t.sol

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import {Errors} from '../../src/contracts/protocol/libraries/helpers/Errors.sol'
2727
import {ProxyHelpers} from '../utils/ProxyHelpers.sol';
2828
import {IParameterRegistry} from '../horizon/dependencies/IParameterRegistry.sol';
2929
import {AaveV3EthereumHorizonCustom} from '../horizon/utils/AaveV3EthereumHorizonCustom.sol';
30-
import {AaveV3EthereumHorizon, AaveV3EthereumHorizonAssets} from 'aave-address-book/AaveV3EthereumHorizon.sol';
3130

3231
abstract contract HorizonBaseTest is Test {
3332
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;
@@ -94,13 +93,13 @@ abstract contract HorizonBaseTest is Test {
9493
}
9594

9695
function initEnvironment() internal virtual {
97-
pool = IPool(address(AaveV3EthereumHorizon.POOL));
98-
revenueSplitter = IRevenueSplitter(address(AaveV3EthereumHorizon.COLLECTOR));
96+
pool = IPool(AaveV3EthereumHorizonCustom.POOL);
97+
revenueSplitter = IRevenueSplitter(AaveV3EthereumHorizonCustom.REVENUE_SPLITTER);
9998
defaultInterestRateStrategy = IDefaultInterestRateStrategyV2(
100-
AaveV3EthereumHorizonAssets.GHO_INTEREST_RATE_STRATEGY
99+
AaveV3EthereumHorizonCustom.DEFAULT_INTEREST_RATE_STRATEGY
101100
);
102-
aTokenImpl = AaveV3EthereumHorizon.DEFAULT_A_TOKEN_IMPL;
103-
variableDebtTokenImpl = AaveV3EthereumHorizon.DEFAULT_VARIABLE_DEBT_TOKEN_IMPL;
101+
aTokenImpl = AaveV3EthereumHorizonCustom.ATOKEN_IMPLEMENTATION;
102+
variableDebtTokenImpl = AaveV3EthereumHorizonCustom.VARIABLE_DEBT_TOKEN_IMPLEMENTATION;
104103
rwaATokenImpl = AaveV3EthereumHorizonCustom.RWA_ATOKEN_IMPLEMENTATION;
105104
}
106105

tests/deployments/HorizonPhaseTwoListing.t.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ contract HorizonPhaseTwoListingTest is HorizonBaseTest {
4848
liquidationBonus: 100_00 + 3_00,
4949
label: 'VBILL GHO',
5050
collateralAssets: _toDynamicAddressArray(AaveV3EthereumHorizonCustom.VBILL_UNDERLYING),
51-
borrowableAssets: _toDynamicAddressArray(AaveV3EthereumHorizonAssets.GHO_UNDERLYING)
51+
borrowableAssets: _toDynamicAddressArray(AaveV3EthereumHorizonCustom.GHO_UNDERLYING)
5252
});
5353

5454
uint8 internal constant VBILL_GHO_EMODE_CATEGORY = 1;
@@ -101,8 +101,8 @@ contract HorizonPhaseTwoListingTest is HorizonBaseTest {
101101
token: token,
102102
params: params,
103103
borrowableAssets: _toDynamicAddressArray(
104-
AaveV3EthereumHorizonAssets.USDC_UNDERLYING,
105-
AaveV3EthereumHorizonAssets.GHO_UNDERLYING
104+
AaveV3EthereumHorizonCustom.USDC_UNDERLYING,
105+
AaveV3EthereumHorizonCustom.GHO_UNDERLYING
106106
),
107107
dealCollateral: false
108108
});
@@ -192,7 +192,7 @@ contract HorizonPhaseTwoListingVTestnetTest is HorizonPhaseTwoListingTest {
192192
vm.startPrank(user);
193193
IERC20(AaveV3EthereumHorizonCustom.VBILL_UNDERLYING).approve(address(pool), 100e6);
194194
pool.supply(AaveV3EthereumHorizonCustom.VBILL_UNDERLYING, 100e6, user, 0);
195-
pool.borrow(AaveV3EthereumHorizonAssets.USDC_UNDERLYING, 50e6, 2, 0, user);
195+
pool.borrow(AaveV3EthereumHorizonCustom.USDC_UNDERLYING, 50e6, 2, 0, user);
196196
vm.stopPrank();
197197
}
198198
}

tests/horizon/utils/AaveV3EthereumHorizonCustom.sol

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ library AaveV3EthereumHorizonCustom {
4141
address public constant VBILL_UNDERLYING = 0x2255718832bC9fD3bE1CaF75084F4803DA14FF01;
4242
address public constant VBILL_PRICE_FEED = 0x5ed77a9D9b7cc80E9d0D7711024AF38C2643C1c4;
4343

44+
address public constant GHO_UNDERLYING = 0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f;
45+
46+
address public constant USDC_UNDERLYING = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;
47+
48+
address public constant RLUSD_UNDERLYING = 0x8292Bb45bf1Ee4d140127049757C2E0fF06317eD;
49+
4450
// oracle param registry
4551
address public constant RWA_ORACLE_PARAMS_REGISTRY = 0x69D55D504BC9556E377b340D19818E736bbB318b;
4652
}

0 commit comments

Comments
 (0)