diff --git a/foundry.toml b/foundry.toml index 5d7370a..bb4cbb1 100644 --- a/foundry.toml +++ b/foundry.toml @@ -13,4 +13,6 @@ remappings = [ "ds-test/=lib/forge-std/lib/ds-test/src/" ] +[fuzz] +runs = 250 # See more config options https://github.com/foundry-rs/foundry/tree/master/config \ No newline at end of file diff --git a/src/test/utils/Setup.sol b/src/test/utils/Setup.sol index dff7a00..00ce9b0 100644 --- a/src/test/utils/Setup.sol +++ b/src/test/utils/Setup.sol @@ -15,8 +15,9 @@ import {IStrategy} from "@tokenized-strategy/interfaces/IStrategy.sol"; import {IVaultFactory} from "@yearn-vaults/interfaces/IVaultFactory.sol"; import {MockStrategy} from "../mocks/MockStrategy.sol"; +import {Clonable} from "../../utils/Clonable.sol"; -contract Setup is ExtendedTest { +contract Setup is ExtendedTest, Clonable { using SafeERC20 for ERC20; VyperDeployer public vyperDeployer = new VyperDeployer(); @@ -76,7 +77,16 @@ contract Setup is ExtendedTest { } function setUpVault() public returns (IVault) { - bytes memory args = abi.encode( + if (original == address(0)) { + original = vyperDeployer.deployContract( + "lib/yearn-vaults-v3/contracts/", + "VaultV3" + ); + } + + IVault _vault = IVault(_clone()); + + _vault.initialize( address(asset), "Test vault", "tsVault", @@ -84,14 +94,6 @@ contract Setup is ExtendedTest { 10 days ); - IVault _vault = IVault( - vyperDeployer.deployContract( - "lib/yearn-vaults-v3/contracts/", - "VaultV3", - args - ) - ); - vm.prank(management); // Give the vault manager all the roles _vault.set_role(vaultManagement, Roles.ALL);