Skip to content

Commit ddc97c8

Browse files
committed
fix: tests on vtestnet sim
1 parent 47f3395 commit ddc97c8

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

tests/deployments/HorizonPhaseTwoListing.t.sol

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ contract HorizonPhaseTwoListingTest is HorizonBaseTest {
7878
});
7979
}
8080

81-
function test_param_registry_VBILL() public {
81+
function test_param_registry_VBILL() public view {
8282
assertEq(
8383
IRwaOracleParameterRegistry(AaveV3EthereumHorizonCustom.RWA_ORACLE_PARAMS_REGISTRY)
8484
.assetExists(AaveV3EthereumHorizonCustom.VBILL_UNDERLYING),
@@ -160,6 +160,14 @@ contract HorizonPhaseTwoListingTest is HorizonBaseTest {
160160
);
161161
require(success, 'Failed to call addWallet()');
162162
}
163+
164+
function _supplyAndBorrow(address user) internal virtual {
165+
vm.startPrank(user);
166+
IERC20(AaveV3EthereumHorizonCustom.VBILL_UNDERLYING).approve(address(pool), 100e6);
167+
pool.supply(AaveV3EthereumHorizonCustom.VBILL_UNDERLYING, 100e6, user, 0);
168+
pool.borrow(AaveV3EthereumHorizonCustom.USDC_UNDERLYING, 50e6, 2, 0, user);
169+
vm.stopPrank();
170+
}
163171
}
164172

165173
/// forge-config: default.evm_version = "cancun"
@@ -178,6 +186,7 @@ contract HorizonPhaseTwoListingVTestnetTest is HorizonPhaseTwoListingTest {
178186
}
179187

180188
function test_actions() public {
189+
// test users from tenderly vtestnet, already whitelisted and seeded with VBILL
181190
address testUser1 = 0xabCa9b6E08dC6C031880f515Ec0cf9e395D0d6B8;
182191
address testUser2 = 0x66C1d4c6195D587C99aCc4256EbaC0a8D0AB9f64;
183192
address testUser3 = 0xd22eefD49B81e078f576Dbb4A804aa250cB3A291;
@@ -186,14 +195,6 @@ contract HorizonPhaseTwoListingVTestnetTest is HorizonPhaseTwoListingTest {
186195
_supplyAndBorrow(testUser2);
187196
_supplyAndBorrow(testUser3);
188197
}
189-
190-
function _supplyAndBorrow(address user) internal virtual {
191-
vm.startPrank(user);
192-
IERC20(AaveV3EthereumHorizonCustom.VBILL_UNDERLYING).approve(address(pool), 100e6);
193-
pool.supply(AaveV3EthereumHorizonCustom.VBILL_UNDERLYING, 100e6, user, 0);
194-
pool.borrow(AaveV3EthereumHorizonCustom.USDC_UNDERLYING, 50e6, 2, 0, user);
195-
vm.stopPrank();
196-
}
197198
}
198199

199200
/// forge-config: default.evm_version = "cancun"

0 commit comments

Comments
 (0)