Skip to content

Commit

Permalink
Merge pull request #82 from yieldnest/chad/sc-573/fix-deploy-imports
Browse files Browse the repository at this point in the history
Fix deploy imports
  • Loading branch information
danoctavian authored Apr 7, 2024
2 parents 0ce1fc3 + 01ae3ed commit c464b25
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 61 deletions.
25 changes: 11 additions & 14 deletions script/BaseScript.s.sol
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
// SPDX-License-Identifier: BSD 3-Clause License
pragma solidity ^0.8.24;

import "lib/openzeppelin-contracts/contracts/proxy/transparent/ProxyAdmin.sol";
import "src/StakingNodesManager.sol";
import "src/StakingNode.sol";
import "src/RewardsReceiver.sol";
import "src/ynLSD.sol";
import "src/YieldNestOracle.sol";
import "src/LSDStakingNode.sol";
import "src/RewardsDistributor.sol";
import "src/external/tokens/WETH.sol";
import "src/ynETH.sol";
import "lib/forge-std/src/Script.sol";
import "lib/forge-std/src/StdJson.sol";
import "script/Utils.sol";

import {StakingNodesManager} from "src/StakingNodesManager.sol";
import {StakingNode} from "src/StakingNode.sol";
import {RewardsReceiver} from "src/RewardsReceiver.sol";
import {ynLSD} from "src/ynLSD.sol";
import {stdJson} from "lib/forge-std/src/StdJson.sol";
import {YieldNestOracle} from "src/YieldNestOracle.sol";
import {LSDStakingNode} from "src/LSDStakingNode.sol";
import {RewardsDistributor} from "src/RewardsDistributor.sol";
import {ynETH} from "src/ynETH.sol";
import {Script} from "lib/forge-std/src/Script.sol";
import {Utils} from "script/Utils.sol";
import {ActorAddresses} from "script/Actors.sol";

abstract contract BaseScript is Script, Utils {
Expand Down
24 changes: 0 additions & 24 deletions script/ContractAddresses.sol
Original file line number Diff line number Diff line change
Expand Up @@ -58,29 +58,6 @@ contract ContractAddresses {
})
});

addresses[5] = ChainAddresses({
ethereum: EthereumAddresses({
WETH_ADDRESS: 0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6,
DEPOSIT_2_ADDRESS: 0xff50ed3d0ec03aC01D4C79aAd74928BFF48a7b2b
}),
eigenlayer: EigenlayerAddresses({
EIGENPOD_MANAGER_ADDRESS: 0xa286b84C96aF280a49Fe1F40B9627C2A2827df41,
DELEGATION_MANAGER_ADDRESS: 0x1b7b8F6b258f95Cf9596EabB9aa18B62940Eb0a8,
DELEGATION_PAUSER_ADDRESS: 0x369e6F597e22EaB55fFb173C6d9cD234BD699111,
STRATEGY_MANAGER_ADDRESS: 0x779d1b5315df083e3F9E94cB495983500bA8E907,
DELAYED_WITHDRAWAL_ROUTER_ADDRESS: 0x89581561f1F98584F88b0d57c2180fb89225388f
}),
lsd: LSDAddresses({
SFRXETH_ADDRESS: 0x0000000000000000000000000000000000000000,
RETH_ADDRESS: 0x178E141a0E3b34152f73Ff610437A7bf9B83267A,
STETH_ADDRESS: 0x1643E812aE58766192Cf7D2Cf9567dF2C37e9B7F,
RETH_FEED_ADDRESS: 0x9c18A124aB957578BE5AE04088159E4AAb22fAc3,
STETH_FEED_ADDRESS: 0x9c18A124aB957578BE5AE04088159E4AAb22fAc3,
RETH_STRATEGY_ADDRESS: 0x879944A8cB437a5f8061361f82A6d4EED59070b5,
STETH_STRATEGY_ADDRESS: 0xB613E78E2068d7489bb66419fB1cfa11275d14da
})
});

// In absence of Eigenlayer a placeholder address is used for all Eigenlayer addresses
address placeholderAddress = address(1);

Expand Down Expand Up @@ -111,5 +88,4 @@ contract ContractAddresses {
function getChainAddresses(uint256 chainId) external view returns (ChainAddresses memory) {
return addresses[chainId];
}

}
38 changes: 22 additions & 16 deletions script/DeployYieldNest.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,28 @@
pragma solidity ^0.8.24;


import "forge-std/Script.sol";
import "lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import "lib/openzeppelin-contracts/contracts/proxy/transparent/ProxyAdmin.sol";
import "src/StakingNodesManager.sol";
import "src/RewardsReceiver.sol";
import "src/RewardsDistributor.sol";
import "src/ynETH.sol";
import "src/interfaces/IStakingNode.sol";
import "src/external/ethereum/IDepositContract.sol";
import "src/interfaces/IRewardsDistributor.sol";
import "src/external/tokens/IWETH.sol";
import "script/ContractAddresses.sol";
import "script/BaseScript.s.sol";
import "src/YieldNestOracle.sol";
import "src/ynLSD.sol";

import {TransparentUpgradeableProxy} from "lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import {IEigenPodManager} from "src/external/eigenlayer/v0.1.0/interfaces/IEigenPodManager.sol";
import {IDelegationManager} from "src/external/eigenlayer/v0.1.0/interfaces/IDelegationManager.sol";
import {IDelayedWithdrawalRouter} from "src/external/eigenlayer/v0.1.0/interfaces/IDelayedWithdrawalRouter.sol";
import {IStrategyManager} from "src/external/eigenlayer/v0.1.0/interfaces/IStrategyManager.sol";
import {IDepositContract} from "src/external/ethereum/IDepositContract.sol";
import {IRewardsDistributor} from "src/interfaces/IRewardsDistributor.sol";
import {IynETH} from "src/interfaces/IynETH.sol";
import {IStakingNodesManager} from "src/interfaces/IStakingNodesManager.sol";
import {IWETH} from "src/external/tokens/IWETH.sol";

import {StakingNodesManager} from "src/StakingNodesManager.sol";
import {StakingNode} from "src/StakingNode.sol";
import {RewardsReceiver} from "src/RewardsReceiver.sol";
import {RewardsDistributor} from "src/RewardsDistributor.sol";
import {ynETH} from "src/ynETH.sol";
import {ContractAddresses} from "script/ContractAddresses.sol";
import {BaseScript} from "script/BaseScript.s.sol";
import {YieldNestOracle} from "src/YieldNestOracle.sol";
import {ynLSD} from "src/ynLSD.sol";
import {ActorAddresses} from "script/Actors.sol";
import {console} from "lib/forge-std/src/console.sol";

contract DeployYieldNest is BaseScript {

Expand Down
17 changes: 13 additions & 4 deletions script/DeployYnLSD.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,22 @@
pragma solidity ^0.8.24;

import {TransparentUpgradeableProxy} from "lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import {IERC20} from "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import {IEigenPodManager} from "src/external/eigenlayer/v0.1.0/interfaces/IEigenPodManager.sol";
import {IDelegationManager} from "src/external/eigenlayer/v0.1.0/interfaces/IDelegationManager.sol";
import {IDelayedWithdrawalRouter} from "src/external/eigenlayer/v0.1.0/interfaces/IDelayedWithdrawalRouter.sol";
import {IStrategyManager} from "src/external/eigenlayer/v0.1.0/interfaces/IStrategyManager.sol";
import {IStrategy} from "src/external/eigenlayer/v0.1.0/interfaces/IStrategy.sol";
import {IDepositContract} from "src/external/ethereum/IDepositContract.sol";
import {IWETH} from "src/external/tokens/IWETH.sol";

import {ynLSD} from "src/ynLSD.sol";
import {YieldNestOracle} from "src/YieldNestOracle.sol";
import {LSDStakingNode} from "src/LSDStakingNode.sol";
import "src/external/tokens/IWETH.sol";
import "script/ContractAddresses.sol";
import "script/BaseScript.s.sol";

import {ContractAddresses} from "script/ContractAddresses.sol";
import {ActorAddresses} from "script/Actors.sol";
import {BaseScript} from "script/BaseScript.s.sol";
import {console} from "lib/forge-std/src/console.sol";

contract DeployYnLSD is BaseScript {
ynLSD public ynlsd;
Expand Down
10 changes: 8 additions & 2 deletions script/Upgrade.s.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
// SPDX-License-Identifier: BSD 3-Clause License
pragma solidity ^0.8.24;

import "lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import "script/BaseScript.s.sol";
import {ITransparentUpgradeableProxy} from "lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import {ProxyAdmin} from "lib/openzeppelin-contracts/contracts/proxy/transparent/ProxyAdmin.sol";
import {BaseScript} from "script/BaseScript.s.sol";
import {ynETH} from "src/ynETH.sol";
import {StakingNodesManager} from "src/StakingNodesManager.sol";
import {RewardsDistributor} from "src/RewardsDistributor.sol";
import {StakingNode} from "src/StakingNode.sol";
import {console} from "lib/forge-std/src/console.sol";

contract Upgrade is BaseScript {
function _deployImplementation(string memory contractName) internal returns (address, address) {
Expand Down
2 changes: 1 addition & 1 deletion script/Utils.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BSD 3-Clause License
pragma solidity ^0.8.24;

import {Vm} from "forge-std/Vm.sol";
import {Vm} from "lib/forge-std/src/Vm.sol";
import {ERC1967Utils} from "lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Utils.sol";

contract Utils {
Expand Down

0 comments on commit c464b25

Please sign in to comment.