From 4c2c2e2adc4fae796708843cca07ddfd964dbe04 Mon Sep 17 00:00:00 2001 From: Schlagonia Date: Thu, 12 Oct 2023 14:55:07 -0600 Subject: [PATCH] fix: vault setup --- src/test/CommonTrigger.t.sol | 7 ------- src/test/utils/Setup.sol | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/test/CommonTrigger.t.sol b/src/test/CommonTrigger.t.sol index 577f610..a9071b5 100644 --- a/src/test/CommonTrigger.t.sol +++ b/src/test/CommonTrigger.t.sol @@ -360,13 +360,6 @@ contract CommonTriggerTest is Setup { // Deploy a vault. vault = setUpVault(); - vm.prank(management); - // Give the vault manager all the roles - vault.add_role(vaultManagement, 16383); - - vm.prank(vaultManagement); - vault.set_deposit_limit(type(uint256).max); - bytes memory _calldata = abi.encodeWithSelector( vault.process_report.selector, address(mockStrategy) diff --git a/src/test/utils/Setup.sol b/src/test/utils/Setup.sol index 3673a6f..82fbaaa 100644 --- a/src/test/utils/Setup.sol +++ b/src/test/utils/Setup.sol @@ -89,6 +89,14 @@ contract Setup is ExtendedTest { ) ); + vm.prank(management); + // Give the vault manager all the roles + vault.add_role(vaultManagement, 16383); + + vm.prank(vaultManagement); + vault.set_deposit_limit(type(uint256).max); + + return _vault; }