-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Among the e2e assets test, some of them are testing for revert when going above supply & borrow caps
aave-helpers/src/ProtocolV3TestBase.sol
Line 152 in 30ae829
| function e2eTestAsset( |
To do this the vaults get seeded with 100k$ of collateral and 10k$ of asset to be tested.
aave-helpers/src/ProtocolV3TestBase.sol
Line 165 in 30ae829
| uint256 collateralAssetAmount = _getTokenAmountByDollarValue(pool, collateralConfig, 100000); |
aave-helpers/src/ProtocolV3TestBase.sol
Line 166 in 30ae829
| uint256 testAssetAmount = _getTokenAmountByDollarValue(pool, testAssetConfig, 10000); |
When the tested asset can be borrowed the test will set borrow cap to 1 and check that borrowing 11**decimals asset revert with the error being that the borrow cap have been reached (BORROW_CAP_EXCEEDED). However if 11**decimals asset is worth moar than 10k$ the test will revert with INVALID_AMOUNT instead as we are trying to borrow moar than the supply.
aave-helpers/src/ProtocolV3TestBase.sol
Line 218 in 30ae829
| amount: 11 ** testAssetConfig.decimals, |