Commit b0431c59 authored by Mark Tyneway's avatar Mark Tyneway

contracts-bedrock: simplify storage setting in SuperchainConfig

Improve auditability + readability with some type safety.
Based on https://github.com/ethereum-optimism/optimism/pull/8435
parent ae158218
...@@ -71,14 +71,14 @@ contract SuperchainConfig is Initializable, ISemver { ...@@ -71,14 +71,14 @@ contract SuperchainConfig is Initializable, ISemver {
/// @notice Pauses withdrawals. /// @notice Pauses withdrawals.
/// @param _identifier (Optional) A string to identify provenance of the pause transaction. /// @param _identifier (Optional) A string to identify provenance of the pause transaction.
function _pause(string memory _identifier) internal { function _pause(string memory _identifier) internal {
Storage.setUint(PAUSED_SLOT, 1); Storage.setBool(PAUSED_SLOT, true);
emit Paused(_identifier); emit Paused(_identifier);
} }
/// @notice Unpauses withdrawals. /// @notice Unpauses withdrawals.
function unpause() external { function unpause() external {
require(msg.sender == guardian(), "SuperchainConfig: only guardian can unpause"); require(msg.sender == guardian(), "SuperchainConfig: only guardian can unpause");
Storage.setUint(PAUSED_SLOT, 0); Storage.setBool(PAUSED_SLOT, false);
emit Unpaused(); emit Unpaused();
} }
......
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