Skip to content

Commit

Permalink
Merge pull request #189 from yieldnest/fix/tests-ynLSDeWithdrawals
Browse files Browse the repository at this point in the history
Fix/tests yn ls de withdrawals
  • Loading branch information
danoctavian authored Nov 1, 2024
2 parents 7805347 + 6887979 commit 604d801
Show file tree
Hide file tree
Showing 5 changed files with 446 additions and 195 deletions.
13 changes: 11 additions & 2 deletions script/ContractAddresses.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ contract ContractAddresses {
address LSD_RATE_PROVIDER_ADDRESS;
address YNEIGEN_DEPOSIT_ADAPTER_ADDRESS;
address TIMELOCK_CONTROLLER_ADDRESS;
address REDEMPTION_ASSETS_VAULT_ADDRESS;
address WITHDRAWAL_QUEUE_MANAGER_ADDRESS;
address WRAPPER;
}

struct YieldNestAddresses {
Expand Down Expand Up @@ -134,7 +137,10 @@ contract ContractAddresses {
EIGEN_STRATEGY_MANAGER_ADDRESS: 0x92D904019A92B0Cafce3492Abb95577C285A68fC,
LSD_RATE_PROVIDER_ADDRESS: 0xb658Cf6F4C232Be5c6035f2b42b96393089F20D9,
YNEIGEN_DEPOSIT_ADAPTER_ADDRESS: 0x9e72155d301a6555dc565315be72D295c76753c0,
TIMELOCK_CONTROLLER_ADDRESS: 0xbB73f8a5B0074b27c6df026c77fA08B0111D017A
TIMELOCK_CONTROLLER_ADDRESS: 0xbB73f8a5B0074b27c6df026c77fA08B0111D017A,
REDEMPTION_ASSETS_VAULT_ADDRESS: 0x73bC33999C34a5126CA19dC900F22690C288D55e,
WITHDRAWAL_QUEUE_MANAGER_ADDRESS: 0x8Face3283E20b19d98a7a132274B69C1304D60b4,
WRAPPER: 0x99dB7619C018D61dBC2822767B63240d311d6992
})
});

Expand Down Expand Up @@ -192,7 +198,10 @@ contract ContractAddresses {
EIGEN_STRATEGY_MANAGER_ADDRESS: 0xA0a11A9b84bf87c0323bc183715a22eC7881B7FC,
LSD_RATE_PROVIDER_ADDRESS: 0xd68C29263F6dC2Ff8D9307b3AfAcD6D6fDeFbB3A,
YNEIGEN_DEPOSIT_ADAPTER_ADDRESS: 0x7d0c1F604571a1c015684e6c15f2DdEc432C5e74,
TIMELOCK_CONTROLLER_ADDRESS: 0x62173555C27C67644C5634e114e42A63A59CD7A5
TIMELOCK_CONTROLLER_ADDRESS: 0x62173555C27C67644C5634e114e42A63A59CD7A5,
REDEMPTION_ASSETS_VAULT_ADDRESS: 0xd536087701fFf805d20ee6651E55C90D645fD1a3,
WITHDRAWAL_QUEUE_MANAGER_ADDRESS: 0xaF8052DC454318D52A4478a91aCa14305590389f,
WRAPPER: 0x8F61bcb28C5b88e5F10ec5bb3C18f231D763A309
})
});
}
Expand Down
6 changes: 5 additions & 1 deletion test/scenarios/ynEIGEN/ynLSDeDepositAdapter.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ import {TestAssetUtils} from "test/utils/TestAssetUtils.sol";

import "./ynLSDeWithdrawals.t.sol";

contract ynLSDeDepositAdapterTest is ynLSDeWithdrawalsTest {
contract ynLSDeDepositAdapterTest is ynLSDeScenarioBaseTest {

TestAssetUtils public testAssetUtils;

address public constant user = address(0x42069);

uint256 public constant AMOUNT = 1 ether;

function setUp() public override {
super.setUp();

Expand Down
12 changes: 12 additions & 0 deletions test/scenarios/ynEIGEN/ynLSDeScenarioBaseTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ import {AssetRegistry} from "../../../src/ynEIGEN/AssetRegistry.sol";
import {EigenStrategyManager} from "../../../src/ynEIGEN/EigenStrategyManager.sol";
import {LSDRateProvider} from "../../../src/ynEIGEN/LSDRateProvider.sol";
import {ynEigenDepositAdapter} from "../../../src/ynEIGEN/ynEigenDepositAdapter.sol";
import {RedemptionAssetsVault} from "src/ynEIGEN/RedemptionAssetsVault.sol";
import {WithdrawalQueueManager} from "src/WithdrawalQueueManager.sol";
import {LSDWrapper} from "src/ynEIGEN/LSDWrapper.sol";


import {Test} from "forge-std/Test.sol";

Expand All @@ -43,6 +47,11 @@ contract ynLSDeScenarioBaseTest is Test, Utils {
// Assets
ynEigen public yneigen;

// ynEIGEN Withdrawals
RedemptionAssetsVault public redemptionAssetsVault;
WithdrawalQueueManager public withdrawalQueueManager;
LSDWrapper public wrapper;

// Eigen
IEigenPodManager public eigenPodManager;
IDelegationManager public delegationManager;
Expand Down Expand Up @@ -77,6 +86,9 @@ contract ynLSDeScenarioBaseTest is Test, Utils {
tokenStakingNodesManager = TokenStakingNodesManager(chainAddresses.ynEigen.TOKEN_STAKING_NODES_MANAGER_ADDRESS);
yneigen = ynEigen(chainAddresses.ynEigen.YNEIGEN_ADDRESS);
timelockController = TimelockController(payable(chainAddresses.ynEigen.TIMELOCK_CONTROLLER_ADDRESS));
redemptionAssetsVault = RedemptionAssetsVault(chainAddresses.ynEigen.REDEMPTION_ASSETS_VAULT_ADDRESS);
withdrawalQueueManager = WithdrawalQueueManager(chainAddresses.ynEigen.WITHDRAWAL_QUEUE_MANAGER_ADDRESS);
wrapper = LSDWrapper(chainAddresses.ynEigen.WRAPPER);

}
}
Loading

0 comments on commit 604d801

Please sign in to comment.