staking/script/Deploy.s.sol
Ricardo Guilherme Schmidt 6af73d3883
refactor(StakeManager): Extract Updated StakeManager to its own contract, to remove logic not interesting for first contract.
refactor(StakeManager): Move Epoch logic to EpochMath.sol
refactor(MutliplierPointMath): rename functions
feat(MutliplierPointMath):  Add missing functions from spec
feat(StakeMath): change to use custom errors
fix(StakeMath): fix _estimateLockTime
chore(IStakeConstants): remove unused import
refactor(StakeManager): move Account struct to
IStakeManager
refactor(StakeManager): move Epoch struct to EpochMath
refactor(IStakeManger): move errors to StakeMath
chore(.vscode): Fix remappings on IDE
2024-11-25 10:31:10 -03:00

22 lines
844 B
Solidity

// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.8.27 <=0.9.0;
import { BaseScript } from "./Base.s.sol";
import { DeploymentConfig } from "./DeploymentConfig.s.sol";
import { StakeManager } from "../contracts/StakeManager.sol";
import { VaultFactory } from "../contracts/VaultFactory.sol";
contract Deploy is BaseScript {
function run() public returns (VaultFactory, StakeManager, DeploymentConfig) {
DeploymentConfig deploymentConfig = new DeploymentConfig(broadcaster);
(, address token) = deploymentConfig.activeNetworkConfig();
vm.startBroadcast(broadcaster);
StakeManager stakeManager = new StakeManager(token);
VaultFactory vaultFactory = new VaultFactory(address(stakeManager));
vm.stopBroadcast();
return (vaultFactory, stakeManager, deploymentConfig);
}
}