@@ -28,7 +28,7 @@ contract StakingLens {
2828 AwaitingWithdrawal
2929 }
3030
31- struct DelegationPosition {
31+ struct Delegation {
3232 uint64 validatorId;
3333 uint8 withdrawId;
3434 DelegationState state;
@@ -86,8 +86,8 @@ contract StakingLens {
8686 }
8787 }
8888
89- function getDelegations (address delegator ) external returns (DelegationPosition [] memory positions ) {
90- positions = new DelegationPosition [](MAX_POSITIONS);
89+ function getDelegations (address delegator ) external returns (Delegation [] memory positions ) {
90+ positions = new Delegation [](MAX_POSITIONS);
9191 uint256 positionCount = 0 ;
9292 uint16 validatorCount = 0 ;
9393
@@ -124,7 +124,7 @@ contract StakingLens {
124124 address delegator ,
125125 uint64 validatorId ,
126126 uint64 currentEpoch ,
127- DelegationPosition [] memory positions ,
127+ Delegation [] memory positions ,
128128 uint256 positionCount
129129 ) internal returns (uint256 newPositionCount ) {
130130 DelegatorSnapshot memory snap = _readDelegator (delegator, validatorId);
@@ -138,7 +138,7 @@ contract StakingLens {
138138 }
139139
140140 if (snap.stake > 0 && positionCount < MAX_POSITIONS) {
141- positions[positionCount] = DelegationPosition ({
141+ positions[positionCount] = Delegation ({
142142 validatorId: validatorId,
143143 withdrawId: lastWithdrawId,
144144 state: DelegationState.Active,
@@ -151,7 +151,7 @@ contract StakingLens {
151151 }
152152
153153 if (snap.pendingStake > 0 && positionCount < MAX_POSITIONS) {
154- positions[positionCount] = DelegationPosition ({
154+ positions[positionCount] = Delegation ({
155155 validatorId: validatorId,
156156 withdrawId: lastWithdrawId,
157157 state: DelegationState.Activating,
@@ -177,7 +177,7 @@ contract StakingLens {
177177 address delegator ,
178178 uint64 validatorId ,
179179 uint64 currentEpoch ,
180- DelegationPosition [] memory positions ,
180+ Delegation [] memory positions ,
181181 uint256 positionCount
182182 ) internal returns (uint256 newPositionCount , uint8 lastWithdrawId , bool hasWithdrawals ) {
183183 uint256 count = positionCount;
@@ -188,7 +188,7 @@ contract StakingLens {
188188 continue ;
189189 }
190190
191- positions[count] = DelegationPosition ({
191+ positions[count] = Delegation ({
192192 validatorId: validatorId,
193193 withdrawId: withdrawId,
194194 state: withdrawEpoch < currentEpoch ? DelegationState.AwaitingWithdrawal : DelegationState.Deactivating,
0 commit comments