-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from symbioticfi/new-arch
rename stakingController to slasher
- Loading branch information
Showing
15 changed files
with
3,329 additions
and
3,329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity 0.8.25; | ||
// // SPDX-License-Identifier: UNLICENSED | ||
// pragma solidity 0.8.25; | ||
|
||
import "forge-std/Script.sol"; | ||
// import "forge-std/Script.sol"; | ||
|
||
import {MetadataService} from "src/contracts/MetadataService.sol"; | ||
import {NetworkMiddlewareService} from "src/contracts/NetworkMiddlewareService.sol"; | ||
import {NetworkOptInService} from "src/contracts/NetworkOptInService.sol"; | ||
import {NetworkRegistry} from "src/contracts/NetworkRegistry.sol"; | ||
import {OperatorOptInService} from "src/contracts/OperatorOptInService.sol"; | ||
import {OperatorRegistry} from "src/contracts/OperatorRegistry.sol"; | ||
import {VaultFactory} from "src/contracts/VaultFactory.sol"; | ||
import {Vault} from "src/contracts/vault/v1/Vault.sol"; | ||
// import {MetadataService} from "src/contracts/MetadataService.sol"; | ||
// import {NetworkMiddlewareService} from "src/contracts/NetworkMiddlewareService.sol"; | ||
// import {NetworkOptInService} from "src/contracts/NetworkOptInService.sol"; | ||
// import {NetworkRegistry} from "src/contracts/NetworkRegistry.sol"; | ||
// import {OperatorOptInService} from "src/contracts/OperatorOptInService.sol"; | ||
// import {OperatorRegistry} from "src/contracts/OperatorRegistry.sol"; | ||
// import {VaultFactory} from "src/contracts/VaultFactory.sol"; | ||
// import {Vault} from "src/contracts/vault/v1/Vault.sol"; | ||
|
||
contract CoreScript is Script { | ||
function run(address owner) public { | ||
vm.startBroadcast(); | ||
(,, address deployer) = vm.readCallers(); | ||
// contract CoreScript is Script { | ||
// function run(address owner) public { | ||
// vm.startBroadcast(); | ||
// (,, address deployer) = vm.readCallers(); | ||
|
||
VaultFactory vaultFactory = new VaultFactory(deployer); | ||
NetworkRegistry networkRegistry = new NetworkRegistry(); | ||
OperatorRegistry operatorRegistry = new OperatorRegistry(); | ||
MetadataService operatorMetadataService = new MetadataService(address(operatorRegistry)); | ||
MetadataService networkMetadataService = new MetadataService(address(networkRegistry)); | ||
NetworkMiddlewareService networkMiddlewareService = new NetworkMiddlewareService(address(networkRegistry)); | ||
NetworkOptInService networkVaultOptInService = | ||
new NetworkOptInService(address(networkRegistry), address(vaultFactory)); | ||
OperatorOptInService operatorVaultOptInService = | ||
new OperatorOptInService(address(operatorRegistry), address(vaultFactory)); | ||
OperatorOptInService operatorNetworkOptInService = | ||
new OperatorOptInService(address(operatorRegistry), address(networkRegistry)); | ||
// VaultFactory vaultFactory = new VaultFactory(deployer); | ||
// NetworkRegistry networkRegistry = new NetworkRegistry(); | ||
// OperatorRegistry operatorRegistry = new OperatorRegistry(); | ||
// MetadataService operatorMetadataService = new MetadataService(address(operatorRegistry)); | ||
// MetadataService networkMetadataService = new MetadataService(address(networkRegistry)); | ||
// NetworkMiddlewareService networkMiddlewareService = new NetworkMiddlewareService(address(networkRegistry)); | ||
// NetworkOptInService networkVaultOptInService = | ||
// new NetworkOptInService(address(networkRegistry), address(vaultFactory)); | ||
// OperatorOptInService operatorVaultOptInService = | ||
// new OperatorOptInService(address(operatorRegistry), address(vaultFactory)); | ||
// OperatorOptInService operatorNetworkOptInService = | ||
// new OperatorOptInService(address(operatorRegistry), address(networkRegistry)); | ||
|
||
vaultFactory.whitelist( | ||
address( | ||
new Vault( | ||
address(vaultFactory), | ||
address(networkRegistry), | ||
address(networkMiddlewareService), | ||
address(networkVaultOptInService), | ||
address(operatorVaultOptInService), | ||
address(operatorNetworkOptInService) | ||
) | ||
) | ||
); | ||
vaultFactory.transferOwnership(owner); | ||
// vaultFactory.whitelist( | ||
// address( | ||
// new Vault( | ||
// address(vaultFactory), | ||
// address(networkRegistry), | ||
// address(networkMiddlewareService), | ||
// address(networkVaultOptInService), | ||
// address(operatorVaultOptInService), | ||
// address(operatorNetworkOptInService) | ||
// ) | ||
// ) | ||
// ); | ||
// vaultFactory.transferOwnership(owner); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} | ||
// vm.stopBroadcast(); | ||
// } | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity 0.8.25; | ||
// // SPDX-License-Identifier: UNLICENSED | ||
// pragma solidity 0.8.25; | ||
|
||
import "forge-std/Script.sol"; | ||
// import "forge-std/Script.sol"; | ||
|
||
import {IMigratablesFactory} from "src/interfaces/base/IMigratablesFactory.sol"; | ||
import {IVault} from "src/interfaces/vault/v1/IVault.sol"; | ||
// import {IMigratablesFactory} from "src/interfaces/base/IMigratablesFactory.sol"; | ||
// import {IVault} from "src/interfaces/vault/v1/IVault.sol"; | ||
|
||
contract VaultScript is Script { | ||
function run( | ||
address vaultFactory, | ||
address owner, | ||
address collateral, | ||
uint48 epochDuration, | ||
uint48 vetoDuration, | ||
uint48 executeDuration, | ||
address rewardsDistributor, | ||
uint256 adminFee, | ||
bool depositWhitelist | ||
) public { | ||
vm.startBroadcast(); | ||
// contract VaultScript is Script { | ||
// function run( | ||
// address vaultFactory, | ||
// address owner, | ||
// address collateral, | ||
// uint48 epochDuration, | ||
// uint48 vetoDuration, | ||
// uint48 executeDuration, | ||
// address rewardsDistributor, | ||
// uint256 adminFee, | ||
// bool depositWhitelist | ||
// ) public { | ||
// vm.startBroadcast(); | ||
|
||
IMigratablesFactory(vaultFactory).create( | ||
IMigratablesFactory(vaultFactory).lastVersion(), | ||
owner, | ||
abi.encode( | ||
IVault.InitParams({ | ||
collateral: collateral, | ||
epochDuration: epochDuration, | ||
vetoDuration: vetoDuration, | ||
executeDuration: executeDuration, | ||
rewardsDistributor: rewardsDistributor, | ||
adminFee: adminFee, | ||
depositWhitelist: depositWhitelist | ||
}) | ||
) | ||
); | ||
// IMigratablesFactory(vaultFactory).create( | ||
// IMigratablesFactory(vaultFactory).lastVersion(), | ||
// owner, | ||
// abi.encode( | ||
// IVault.InitParams({ | ||
// collateral: collateral, | ||
// epochDuration: epochDuration, | ||
// vetoDuration: vetoDuration, | ||
// executeDuration: executeDuration, | ||
// rewardsDistributor: rewardsDistributor, | ||
// adminFee: adminFee, | ||
// depositWhitelist: depositWhitelist | ||
// }) | ||
// ) | ||
// ); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} | ||
// vm.stopBroadcast(); | ||
// } | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.