@@ -134,7 +134,7 @@ contract EigenPodManager is
134
134
});
135
135
}
136
136
}
137
- emit PodSharesUpdated (podOwner, sharesDelta);
137
+ emit PodSharesUpdated (podOwner, ownerToPod[podOwner], updatedPodOwnerShares, sharesDelta);
138
138
}
139
139
140
140
/**
@@ -155,6 +155,8 @@ contract EigenPodManager is
155
155
int256 updatedPodOwnerShares = podOwnerShares[podOwner] - int256 (shares);
156
156
require (updatedPodOwnerShares >= 0 , "EigenPodManager.removeShares: cannot result in pod owner having negative shares " );
157
157
podOwnerShares[podOwner] = updatedPodOwnerShares;
158
+
159
+ emit PodSharesUpdated (podOwner, ownerToPod[podOwner], updatedPodOwnerShares, - int256 (shares));
158
160
}
159
161
160
162
/**
@@ -175,7 +177,7 @@ contract EigenPodManager is
175
177
int256 updatedPodOwnerShares = currentPodOwnerShares + int256 (shares);
176
178
podOwnerShares[podOwner] = updatedPodOwnerShares;
177
179
178
- emit PodSharesUpdated (podOwner, int256 (shares));
180
+ emit PodSharesUpdated (podOwner, ownerToPod[podOwner], updatedPodOwnerShares, int256 (shares));
179
181
180
182
return uint256 (_calculateChangeInDelegatableShares ({sharesBefore: currentPodOwnerShares, sharesAfter: updatedPodOwnerShares}));
181
183
}
@@ -197,6 +199,7 @@ contract EigenPodManager is
197
199
require (int256 (shares) >= 0 , "EigenPodManager.withdrawSharesAsTokens: shares cannot be negative " );
198
200
require (shares % GWEI_TO_WEI == 0 , "EigenPodManager.withdrawSharesAsTokens: shares must be a whole Gwei amount " );
199
201
int256 currentPodOwnerShares = podOwnerShares[podOwner];
202
+ IEigenPod pod = ownerToPod[podOwner];
200
203
201
204
// if there is an existing shares deficit, prioritize decreasing the deficit first
202
205
if (currentPodOwnerShares < 0 ) {
@@ -205,16 +208,17 @@ contract EigenPodManager is
205
208
if (shares > currentShareDeficit) {
206
209
podOwnerShares[podOwner] = 0 ;
207
210
shares -= currentShareDeficit;
208
- emit PodSharesUpdated (podOwner, int256 (currentShareDeficit));
211
+ emit PodSharesUpdated (podOwner, pod, 0 , int256 (currentShareDeficit));
209
212
// otherwise get rid of as much deficit as possible, and return early, since there is nothing left over to forward on
210
213
} else {
211
- podOwnerShares[podOwner] += int256 (shares);
212
- emit PodSharesUpdated (podOwner, int256 (shares));
214
+ int256 updatedPodOwnerShares = podOwnerShares[podOwner] + int256 (shares);
215
+ podOwnerShares[podOwner] = updatedPodOwnerShares;
216
+ emit PodSharesUpdated (podOwner, pod, updatedPodOwnerShares, int256 (shares));
213
217
return ;
214
218
}
215
219
}
216
220
// Actually withdraw to the destination
217
- ownerToPod[podOwner] .withdrawRestakedBeaconChainETH (destination, shares);
221
+ pod .withdrawRestakedBeaconChainETH (destination, shares);
218
222
}
219
223
220
224
// INTERNAL FUNCTIONS
0 commit comments