@@ -209,9 +209,13 @@ contract XanV1 is
209
209
{
210
210
Council.Data storage councilData = _getCouncilData ();
211
211
if (councilData.scheduledEndTime != 0 && councilData.scheduledImpl != address (0 )) {
212
- _cancelCouncilUpgrade ();
212
+ // TODO! Ask Chris: Should we check `_checkDelayCriterion(councilData.scheduledEndTime);`
213
213
214
- emit CouncilUpgradeVetoed (); // TODO! Revisit event args
214
+ emit CouncilUpgradeVetoed (councilData.scheduledImpl);
215
+
216
+ // Reset the scheduled
217
+ councilData.scheduledImpl = address (0 );
218
+ councilData.scheduledEndTime = 0 ;
215
219
}
216
220
}
217
221
}
@@ -220,10 +224,9 @@ contract XanV1 is
220
224
function cancelVoterBodyUpgrade () external override {
221
225
Voting.Data storage data = _getVotingData ();
222
226
227
+ // TODO! Confirm with Chris
223
228
_checkDelayCriterion (data.scheduledEndTime);
224
229
225
- // TODO! check min quorum
226
-
227
230
// Revert the cancellation if the currently scheduled implementation still
228
231
// * meets the quorum and minimum locked supply for the
229
232
// * is the best ranked implementation
@@ -235,7 +238,7 @@ contract XanV1 is
235
238
revert UpgradeCancellationInvalid (data.scheduledImpl, data.scheduledEndTime);
236
239
}
237
240
238
- emit VoterBodyUpgradeCancelled (data.scheduledImpl, data.scheduledEndTime );
241
+ emit VoterBodyUpgradeCancelled (data.scheduledImpl);
239
242
240
243
// Reset the scheduled upgrade
241
244
data.scheduledImpl = address (0 );
@@ -271,8 +274,15 @@ contract XanV1 is
271
274
272
275
/// @notice @inheritdoc IXanV1
273
276
function cancelCouncilUpgrade () external override onlyCouncil {
274
- emit CouncilUpgradeCancelled ();
275
- _cancelCouncilUpgrade ();
277
+ Council.Data storage data = _getCouncilData ();
278
+
279
+ // TODO! Ask Chris: Should we check `_checkDelayCriterion(data.scheduledEndTime);`
280
+
281
+ emit CouncilUpgradeCancelled (data.scheduledImpl);
282
+
283
+ // Reset the scheduled
284
+ data.scheduledImpl = address (0 );
285
+ data.scheduledEndTime = 0 ;
276
286
}
277
287
278
288
/// @notice @inheritdoc IXanV1
@@ -290,10 +300,15 @@ contract XanV1 is
290
300
revert QuorumOrMinLockedSupplyNotReached (bestRankedImplementation);
291
301
}
292
302
293
- emit CouncilUpgradeVetoed ();
303
+ Council.Data storage data = _getCouncilData ();
304
+
305
+ // TODO! Ask Chris: Should we check `_checkDelayCriterion(data.scheduledEndTime);`
294
306
295
- // Cancel the council upgrade
296
- _cancelCouncilUpgrade ();
307
+ emit CouncilUpgradeVetoed (data.scheduledImpl);
308
+
309
+ // Reset the scheduled upgrade
310
+ data.scheduledImpl = address (0 );
311
+ data.scheduledEndTime = 0 ;
297
312
}
298
313
299
314
/// @inheritdoc IXanV1
@@ -400,14 +415,6 @@ contract XanV1 is
400
415
emit Locked ({account: account, value: value});
401
416
}
402
417
403
- /// @notice Cancels the scheduled upgrade by the council by resetting it to 0.
404
- function _cancelCouncilUpgrade () internal {
405
- Council.Data storage data = _getCouncilData ();
406
-
407
- data.scheduledImpl = address (0 );
408
- data.scheduledEndTime = 0 ;
409
- }
410
-
411
418
/// @notice Authorizes an upgrade.
412
419
/// @param newImpl The new implementation to authorize the upgrade to.
413
420
function _authorizeUpgrade (address newImpl ) internal view override {
0 commit comments