Commit 2def14fc authored by Kelvin Fichter's avatar Kelvin Fichter

fix(ctb): no continue on dictator exit or finalize

Prevents a user from continuing to carry out SystemDictator steps after
the process has been exited or finalized.
parent 4f54bcdb
......@@ -126,6 +126,11 @@ contract SystemDictator is OwnableUpgradeable {
*/
bool public finalized;
/**
* @notice Whether or not the deployment has been exited.
*/
bool public exited;
/**
* @notice Address of the old L1CrossDomainMessenger implementation.
*/
......@@ -137,7 +142,9 @@ contract SystemDictator is OwnableUpgradeable {
* @param _step Current step.
*/
modifier step(uint8 _step) {
require(currentStep == _step, "BaseSystemDictator: incorrect step");
require(!finalized, "SystemDictator: already finalized");
require(!exited, "SystemDictator: already exited");
require(currentStep == _step, "SystemDictator: incorrect step");
_;
currentStep++;
}
......@@ -402,6 +409,7 @@ contract SystemDictator is OwnableUpgradeable {
);
}
// Mark the deployment as finalized.
finalized = true;
}
......@@ -422,5 +430,8 @@ contract SystemDictator is OwnableUpgradeable {
// Unset the DTL shutoff block which will allow the DTL to sync again.
config.globalConfig.addressManager.setAddress("DTL_SHUTOFF_BLOCK", address(0));
// Mark the deployment as exited.
exited = true;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment