2023-09-12 16:37:30 +00:00
|
|
|
// SPDX-License-Identifier: UNLICENSED
|
|
|
|
pragma solidity >=0.8.19 <=0.9.0;
|
|
|
|
|
|
|
|
import { BaseScript } from "./Base.s.sol";
|
|
|
|
import { DeploymentConfig } from "./DeploymentConfig.s.sol";
|
|
|
|
import { StakeManager } from "../contracts/StakeManager.sol";
|
2023-11-07 08:49:22 +00:00
|
|
|
import { VaultFactory } from "../contracts/VaultFactory.sol";
|
2023-09-12 16:37:30 +00:00
|
|
|
|
|
|
|
contract Deploy is BaseScript {
|
2023-11-07 08:49:22 +00:00
|
|
|
function run() public returns (VaultFactory, StakeManager, DeploymentConfig) {
|
2023-09-12 16:37:30 +00:00
|
|
|
DeploymentConfig deploymentConfig = new DeploymentConfig(broadcaster);
|
2023-10-10 11:53:03 +00:00
|
|
|
(, address token) = deploymentConfig.activeNetworkConfig();
|
2023-09-12 16:37:30 +00:00
|
|
|
|
|
|
|
vm.startBroadcast(broadcaster);
|
|
|
|
StakeManager stakeManager = new StakeManager(token, address(0));
|
2023-11-07 08:49:22 +00:00
|
|
|
VaultFactory vaultFactory = new VaultFactory(address(stakeManager));
|
2023-09-12 16:37:30 +00:00
|
|
|
vm.stopBroadcast();
|
|
|
|
|
2023-11-07 08:49:22 +00:00
|
|
|
return (vaultFactory, stakeManager, deploymentConfig);
|
2023-09-12 16:37:30 +00:00
|
|
|
}
|
|
|
|
}
|