-
Notifications
You must be signed in to change notification settings - Fork 24
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 #5 from symbioticfi/new-architecture
New architecture
- Loading branch information
Showing
98 changed files
with
3,477 additions
and
6,817 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
Submodule permit2
deleted from
cc56ad
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,4 +1,3 @@ | ||
forge-std/=lib/forge-std/src/ | ||
permit2/=lib/permit2/ | ||
@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/ | ||
@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/ |
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,48 @@ | ||
// 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/service/MetadataService.sol"; | ||
// import {NetworkMiddlewareService} from "src/contracts/service/NetworkMiddlewareService.sol"; | ||
// import {NetworkRegistry} from "src/contracts/NetworkRegistry.sol"; | ||
// import {OptInService} from "src/contracts/service/OptInService.sol"; | ||
// import {OperatorRegistry} from "src/contracts/OperatorRegistry.sol"; | ||
// import {VaultFactory} from "src/contracts/VaultFactory.sol"; | ||
// import {Vault} from "src/contracts/vault/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)); | ||
// OptInService networkVaultOptInService = | ||
// new OptInService(address(networkRegistry), address(vaultFactory)); | ||
// OptInService operatorVaultOptInService = | ||
// new OptInService(address(operatorRegistry), address(vaultFactory)); | ||
// OptInService operatorNetworkOptInService = | ||
// new OptInService(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
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 was deleted.
Oops, something went wrong.
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
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/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 stakerRewardsDistributor, | ||
// 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, | ||
// stakerRewardsDistributor: stakerRewardsDistributor, | ||
// adminFee: adminFee, | ||
// depositWhitelist: depositWhitelist | ||
// }) | ||
// ) | ||
// ); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} | ||
// vm.stopBroadcast(); | ||
// } | ||
// } |
17 changes: 0 additions & 17 deletions
17
script/deploy/defaultRewardsDistributor/DefaultRewardsDistributor.s.sol
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
script/deploy/defaultRewardsDistributor/DefaultRewardsDistributorFactory.s.sol
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity 0.8.25; | ||
|
||
import {Factory} from "src/contracts/common/Factory.sol"; | ||
|
||
import {IDelegatorFactory} from "src/interfaces/IDelegatorFactory.sol"; | ||
|
||
contract DelegatorFactory is Factory, IDelegatorFactory { | ||
constructor(address owner_) Factory(owner_) {} | ||
} |
Oops, something went wrong.