Skip to content

Commit 6c39691

Browse files
committed
Audit fixes.
1 parent a0e72a3 commit 6c39691

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/contracts-bedrock/src/celo/CeloSuperchainConfig.sol

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ contract CeloSuperchainConfig is Initializable, ISemver {
9494

9595
/// @notice Getter for the current paused status, which depends both on the
9696
/// local paused value, and the paused status of Superchain.
97+
/// @return paused_ True if the system is paused for this identifier and not expired.
9798
function paused() public view returns (bool paused_) {
9899
paused_ = celoPaused();
99100
if (paused_) {
@@ -108,14 +109,19 @@ contract CeloSuperchainConfig is Initializable, ISemver {
108109
}
109110

110111
/// @notice Forward-compatibility getter
112+
/// @dev Getter for the current paused status, which depends both on the
113+
/// local paused value, and the paused status of Superchain.
114+
/// @param _identifier The address identifier to check.
115+
/// @return paused_ True if the system is paused for this identifier and not expired.
111116
function paused(address _identifier) public view returns (bool paused_) {
112117
paused_ = celoPaused();
113118
if (paused_) {
114119
return paused_;
115120
}
116121

117-
if (superchainConfig() != address(0)) {
118-
paused_ = ISuperchainConfig(superchainConfig()).paused(_identifier);
122+
address superchainConfig_ = superchainConfig();
123+
if (superchainConfig_ != address(0)) {
124+
paused_ = ISuperchainConfig(superchainConfig_).paused(_identifier);
119125
}
120126

121127
return paused_;

0 commit comments

Comments
 (0)