Skip to content

Commit

Permalink
fix: vault deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlagonia committed Mar 6, 2024
1 parent 6a307ef commit ddb858e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
2 changes: 2 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
22 changes: 12 additions & 10 deletions src/test/utils/Setup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -76,22 +77,23 @@ 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",
management,
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);
Expand Down

0 comments on commit ddb858e

Please sign in to comment.