@@ -127,14 +127,7 @@ contract StakingNodeDelegation is StakingNodeTestBase {
127
127
128
128
for (uint256 i = 0 ; i < operators.length ; i++ ) {
129
129
vm.prank (operators[i]);
130
- delegationManager.registerAsOperator (
131
- IDelegationManager.OperatorDetails ({
132
- __deprecated_earningsReceiver: address (1 ),
133
- delegationApprover: address (0 ),
134
- stakerOptOutWindowBlocks: 1
135
- }),
136
- "ipfs://some-ipfs-hash "
137
- );
130
+ delegationManager.registerAsOperator (address (0 ),0 , "ipfs://some-ipfs-hash " );
138
131
}
139
132
140
133
nodeId = createStakingNodes (1 )[0 ];
@@ -154,14 +147,6 @@ contract StakingNodeDelegation is StakingNodeTestBase {
154
147
vm.prank (chainAddresses.eigenlayer.DELEGATION_PAUSER_ADDRESS);
155
148
pauseDelegationManager.unpause (0 );
156
149
157
- // register as operator
158
- vm.prank (operator);
159
- delegationManager.registerAsOperator (
160
- address (0 ), // initDelegationApprover
161
- 0 , // allocationDelay
162
- "ipfs://some-ipfs-hash "
163
- );
164
-
165
150
vm.prank (actors.admin.STAKING_NODES_DELEGATOR);
166
151
stakingNodeInstance.delegate (
167
152
operator1, ISignatureUtils.SignatureWithExpiry ({signature: "" , expiry: 0 }), bytes32 (0 )
@@ -319,8 +304,11 @@ contract StakingNodeDelegation is StakingNodeTestBase {
319
304
address delegatedOperator1 = delegationManager.delegatedTo (address (stakingNodeInstance));
320
305
assertEq (delegatedOperator1, operator1, "Delegation is not set to operator1. " );
321
306
307
+ IStrategy[] memory strategies = new IStrategy [](1 );
308
+ strategies[0 ] = stakingNodeInstance.beaconChainETHStrategy ();
309
+
322
310
assertEq (
323
- delegationManager.operatorShares (operator1, stakingNodeInstance. beaconChainETHStrategy ()) ,
311
+ delegationManager.getOperatorShares (operator1, strategies)[ 0 ] ,
324
312
32 ether * validatorIndices.length ,
325
313
"Operator shares should be 32 ETH per validator "
326
314
);
@@ -375,8 +363,11 @@ contract StakingNodeDelegation is StakingNodeTestBase {
375
363
address delegatedOperator1 = delegationManager.delegatedTo (address (stakingNodeInstance));
376
364
assertEq (delegatedOperator1, operator1, "Delegation is not set to operator1. " );
377
365
366
+ IStrategy[] memory strategies = new IStrategy [](1 );
367
+ strategies[0 ] = stakingNodeInstance.beaconChainETHStrategy ();
368
+
378
369
assertEq (
379
- delegationManager.operatorShares (operator1, stakingNodeInstance. beaconChainETHStrategy ()) ,
370
+ delegationManager.getOperatorShares (operator1, strategies)[ 0 ] ,
380
371
32 ether * validatorIndices.length ,
381
372
"Operator shares should be 32 ETH per validator "
382
373
);
@@ -427,7 +418,7 @@ contract StakingNodeDelegation is StakingNodeTestBase {
427
418
IStrategy[] memory strategies = new IStrategy [](1 );
428
419
strategies[0 ] = stakingNodeInstance.beaconChainETHStrategy ();
429
420
// advance time to allow completion
430
- vm.roll (block .number + delegationManager.getWithdrawalDelay (strategies) );
421
+ vm.roll (block .number + delegationManager.minWithdrawalDelayBlocks () + 1 );
431
422
}
432
423
433
424
// complete queued withdrawals
@@ -473,8 +464,11 @@ contract StakingNodeDelegation is StakingNodeTestBase {
473
464
address delegatedOperator1 = delegationManager.delegatedTo (address (stakingNodeInstance));
474
465
assertEq (delegatedOperator1, operator1, "Delegation is not set to operator1. " );
475
466
467
+ IStrategy[] memory strategies = new IStrategy [](1 );
468
+ strategies[0 ] = stakingNodeInstance.beaconChainETHStrategy ();
469
+
476
470
assertEq (
477
- delegationManager.operatorShares (operator1, stakingNodeInstance. beaconChainETHStrategy ()) ,
471
+ delegationManager.getOperatorShares (operator1, strategies)[ 0 ] ,
478
472
32 ether * validatorIndices.length ,
479
473
"Operator shares should be 32 ETH per validator "
480
474
);
@@ -525,7 +519,7 @@ contract StakingNodeDelegation is StakingNodeTestBase {
525
519
IStrategy[] memory strategies = new IStrategy [](1 );
526
520
strategies[0 ] = stakingNodeInstance.beaconChainETHStrategy ();
527
521
// advance time to allow completion
528
- vm.roll (block .number + delegationManager.getWithdrawalDelay (strategies) );
522
+ vm.roll (block .number + delegationManager.minWithdrawalDelayBlocks () + 1 );
529
523
}
530
524
531
525
// complete queued withdrawals
@@ -586,8 +580,11 @@ contract StakingNodeDelegation is StakingNodeTestBase {
586
580
address delegatedOperator1 = delegationManager.delegatedTo (address (stakingNodeInstance));
587
581
assertEq (delegatedOperator1, operator1, "Delegation is not set to operator1. " );
588
582
583
+ IStrategy[] memory strategies = new IStrategy [](1 );
584
+ strategies[0 ] = stakingNodeInstance.beaconChainETHStrategy ();
585
+
589
586
assertEq (
590
- delegationManager.operatorShares (operator1, stakingNodeInstance. beaconChainETHStrategy ()) ,
587
+ delegationManager.getOperatorShares (operator1, strategies)[ 0 ] ,
591
588
32 ether * validatorIndices.length ,
592
589
"Operator shares should be 32 ETH per validator "
593
590
);
@@ -654,7 +651,7 @@ contract StakingNodeDelegation is StakingNodeTestBase {
654
651
IStrategy[] memory strategies = new IStrategy [](1 );
655
652
strategies[0 ] = stakingNodeInstance.beaconChainETHStrategy ();
656
653
// advance time to allow completion
657
- vm.roll (block .number + delegationManager.getWithdrawalDelay (strategies) );
654
+ vm.roll (block .number + delegationManager.minWithdrawalDelayBlocks () + 1 );
658
655
}
659
656
660
657
// complete queued withdrawals
@@ -705,8 +702,11 @@ contract StakingNodeDelegation is StakingNodeTestBase {
705
702
address delegatedOperator2 = delegationManager.delegatedTo (address (stakingNodeInstance));
706
703
assertEq (delegatedOperator2, operator2, "Delegation is not set to operator2. " );
707
704
705
+ IStrategy[] memory strategies = new IStrategy [](1 );
706
+ strategies[0 ] = stakingNodeInstance.beaconChainETHStrategy ();
707
+
708
708
assertEq (
709
- delegationManager.operatorShares (operator2, stakingNodeInstance. beaconChainETHStrategy ()) ,
709
+ delegationManager.getOperatorShares (operator2, strategies)[ 0 ] ,
710
710
32 ether * validatorIndices.length ,
711
711
"Operator shares should be 32 ETH per validator "
712
712
);
@@ -736,7 +736,7 @@ contract StakingNodeDelegation is StakingNodeTestBase {
736
736
yneth.totalAssets (), initialTotalAssets, "Total assets should not change after delegation to operator2 "
737
737
);
738
738
739
- assertEq (eigenPodManager.podOwnerShares (address (stakingNodeInstance)), 0 , "Pod owner shares should be 0 " );
739
+ assertEq (eigenPodManager.podOwnerDepositShares (address (stakingNodeInstance)), 0 , "Pod owner shares should be 0 " );
740
740
741
741
_completeQueuedWithdrawalsAsShares (queuedWithdrawals, nodeId, initialOperator);
742
742
@@ -747,14 +747,17 @@ contract StakingNodeDelegation is StakingNodeTestBase {
747
747
"Total assets should not change after completing queued withdrawals "
748
748
);
749
749
750
+ IStrategy[] memory strategies = new IStrategy [](1 );
751
+ strategies[0 ] = stakingNodeInstance.beaconChainETHStrategy ();
752
+
750
753
assertEq (
751
- delegationManager.operatorShares (operator2, stakingNodeInstance. beaconChainETHStrategy ()) ,
754
+ delegationManager.getOperatorShares (operator2, strategies)[ 0 ] ,
752
755
32 ether * validatorIndices.length ,
753
756
"Operator shares should be 32 ETH per validator "
754
757
);
755
758
756
759
assertEq (
757
- eigenPodManager.podOwnerShares (address (stakingNodeInstance)),
760
+ eigenPodManager.podOwnerDepositShares (address (stakingNodeInstance)),
758
761
int256 (32 ether * validatorIndices.length ),
759
762
"Pod owner shares should be 32 ETH per validator "
760
763
);
0 commit comments