@@ -8670,16 +8670,16 @@ contract DelegationManagerUnitTests_getQueuedWithdrawals is DelegationManagerUni
8670
8670
8671
8671
// Get shares from withdrawal - should return 50 shares (100 * 0.5) using original magnitude
8672
8672
// rather than incorrectly returning 100 shares (100 * 1.0) using new magnitude
8673
- uint256 [] memory shares = delegationManager.getSharesFromQueuedWithdrawal (withdrawalRoot);
8673
+ (, uint256 [] memory shares ) = delegationManager.getQueuedWithdrawalFromRoot (withdrawalRoot);
8674
8674
assertEq (shares[0 ], 50e18 , "shares should be 50e18 (100e18 * 0.5) using original magnitude " );
8675
8675
}
8676
8676
}
8677
8677
8678
- contract DelegationManagerUnitTests_getSharesFromQueuedWithdrawal is DelegationManagerUnitTests {
8678
+ contract DelegationManagerUnitTests_getQueuedWithdrawalFromRoot is DelegationManagerUnitTests {
8679
8679
using ArrayLib for * ;
8680
8680
using SlashingLib for * ;
8681
8681
8682
- function test_getSharesFromQueuedWithdrawal_Correctness (Randomness r ) public rand (r) {
8682
+ function test_getQueuedWithdrawalFromRoot_Correctness (Randomness r ) public rand (r) {
8683
8683
// Set up initial deposit
8684
8684
uint256 depositAmount = r.Uint256 (1 ether, 100 ether);
8685
8685
_depositIntoStrategies (defaultStaker, strategyMock.toArray (), depositAmount.toArrayU256 ());
@@ -8703,14 +8703,14 @@ contract DelegationManagerUnitTests_getSharesFromQueuedWithdrawal is DelegationM
8703
8703
delegationManager.queueWithdrawals (queuedWithdrawalParams);
8704
8704
8705
8705
// Get shares from queued withdrawal
8706
- uint256 [] memory shares = delegationManager.getSharesFromQueuedWithdrawal (withdrawalRoot);
8706
+ (, uint256 [] memory shares ) = delegationManager.getQueuedWithdrawalFromRoot (withdrawalRoot);
8707
8707
8708
8708
// Verify withdrawal details match
8709
8709
assertEq (shares.length , 1 , "incorrect shares array length " );
8710
8710
assertEq (shares[0 ], depositAmount, "incorrect shares amount " );
8711
8711
}
8712
8712
8713
- function test_getSharesFromQueuedWithdrawal_AfterSlashing (Randomness r ) public rand (r) {
8713
+ function test_getQueuedWithdrawalFromRoot_AfterSlashing (Randomness r ) public rand (r) {
8714
8714
// Set up initial deposit
8715
8715
uint256 depositAmount = r.Uint256 (1 ether, 100 ether);
8716
8716
_depositIntoStrategies (defaultStaker, strategyMock.toArray (), depositAmount.toArrayU256 ());
@@ -8739,20 +8739,20 @@ contract DelegationManagerUnitTests_getSharesFromQueuedWithdrawal is DelegationM
8739
8739
delegationManager.slashOperatorShares (defaultOperator, strategyMock, WAD, 0.5 ether);
8740
8740
8741
8741
// Get shares from queued withdrawal
8742
- uint256 [] memory shares = delegationManager.getSharesFromQueuedWithdrawal (withdrawalRoot);
8742
+ (, uint256 [] memory shares ) = delegationManager.getQueuedWithdrawalFromRoot (withdrawalRoot);
8743
8743
8744
8744
// Verify withdrawal details match and shares are slashed
8745
8745
assertEq (shares.length , 1 , "incorrect shares array length " );
8746
8746
assertEq (shares[0 ], depositAmount / 2 , "shares not properly slashed " );
8747
8747
}
8748
8748
8749
- function test_getSharesFromQueuedWithdrawal_NonexistentWithdrawal () public {
8749
+ function test_getQueuedWithdrawalFromRoot_NonexistentWithdrawal () public {
8750
8750
bytes32 nonexistentRoot = bytes32 (uint256 (1 ));
8751
- uint256 [] memory shares = delegationManager.getSharesFromQueuedWithdrawal (nonexistentRoot);
8751
+ (, uint256 [] memory shares ) = delegationManager.getQueuedWithdrawalFromRoot (nonexistentRoot);
8752
8752
assertEq (shares.length , 0 , "shares array should be empty " );
8753
8753
}
8754
8754
8755
- function test_getSharesFromQueuedWithdrawal_MultipleStrategies (Randomness r ) public rand (r) {
8755
+ function test_getQueuedWithdrawalFromRoot_MultipleStrategies (Randomness r ) public rand (r) {
8756
8756
// Set up multiple strategies with deposits
8757
8757
uint256 numStrategies = r.Uint256 (2 , 5 );
8758
8758
uint256 [] memory depositShares = r.Uint256Array ({
@@ -8782,7 +8782,7 @@ contract DelegationManagerUnitTests_getSharesFromQueuedWithdrawal is DelegationM
8782
8782
delegationManager.queueWithdrawals (queuedWithdrawalParams);
8783
8783
8784
8784
// Get shares from queued withdrawal
8785
- uint256 [] memory shares = delegationManager.getSharesFromQueuedWithdrawal (withdrawalRoot);
8785
+ (, uint256 [] memory shares ) = delegationManager.getQueuedWithdrawalFromRoot (withdrawalRoot);
8786
8786
8787
8787
// Verify withdrawal details and shares for each strategy
8788
8788
assertEq (shares.length , numStrategies, "incorrect shares array length " );
@@ -8791,8 +8791,8 @@ contract DelegationManagerUnitTests_getSharesFromQueuedWithdrawal is DelegationM
8791
8791
}
8792
8792
}
8793
8793
8794
- function testFuzz_getSharesFromQueuedWithdrawal_EmptyWithdrawal (bytes32 withdrawalRoot ) public {
8795
- uint256 [] memory shares = delegationManager.getSharesFromQueuedWithdrawal (withdrawalRoot);
8794
+ function testFuzz_getQueuedWithdrawalFromRoot_EmptyWithdrawal (bytes32 withdrawalRoot ) public {
8795
+ (, uint256 [] memory shares ) = delegationManager.getQueuedWithdrawalFromRoot (withdrawalRoot);
8796
8796
assertEq (shares.length , 0 , "sanity check " );
8797
8797
}
8798
8798
}
0 commit comments