File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -489,6 +489,31 @@ contract ATokenVaultFactoryTest is Test {
489489 vm.stopPrank ();
490490 }
491491
492+ function testDeployVaultExceedingMaxFeeReverts (uint256 initialDeposit , uint256 initFee ) public {
493+ initialDeposit = _boundInitialDeposit (initialDeposit);
494+ initFee = bound (initFee, 1e18 + 1 , type (uint256 ).max);
495+
496+ deal (address (dai), ALICE, initialDeposit);
497+
498+ vm.startPrank (ALICE);
499+ dai.approve (address (factory), initialDeposit);
500+
501+ ATokenVaultFactory.VaultParams memory params = ATokenVaultFactory.VaultParams ({
502+ underlying: address (dai),
503+ referralCode: 0 ,
504+ poolAddressesProvider: IPoolAddressesProvider (address (poolAddrProvider)),
505+ owner: ALICE,
506+ initialFee: initFee,
507+ shareName: "Max Fee Vault " ,
508+ shareSymbol: "MFV " ,
509+ initialLockDeposit: initialDeposit
510+ });
511+
512+ vm.expectRevert ("FEE_TOO_HIGH " );
513+ factory.deployVault (params);
514+ vm.stopPrank ();
515+ }
516+
492517 /*//////////////////////////////////////////////////////////////
493518 CONSTRUCTOR TESTS
494519 //////////////////////////////////////////////////////////////*/
You can’t perform that action at this time.
0 commit comments