Skip to content

Commit d4783b8

Browse files
Merge pull request #267 from gildlab/2025-12-08-owner-freezable-storage
lint
2 parents e9c00f8 + f128869 commit d4783b8

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/abstract/OwnerFreezable.sol

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ abstract contract OwnerFreezable is IOwnerFreezableV1, OwnableUpgradeable {
5959
/// than the protected time the `to` address cannot be removed from the
6060
/// always allowed list.
6161
/// @custom:storage-location erc7201:rain.storage.owner-freezable.1
62-
struct OwnerFreezableV1Storage {
62+
struct OwnerFreezableV17201Storage {
6363
uint256 ownerFrozenUntil;
6464
mapping(address from => uint256 protectedUntil) alwaysAllowedFroms;
6565
mapping(address to => uint256 protectedUntil) alwaysAllowedTos;
6666
}
6767

68-
function getStorage() private pure returns (OwnerFreezableV1Storage storage s) {
68+
function getStorage() private pure returns (OwnerFreezableV17201Storage storage s) {
6969
assembly {
7070
s.slot := OWNER_FREEZABLE_V1_STORAGE_LOCATION
7171
}
@@ -78,25 +78,25 @@ abstract contract OwnerFreezable is IOwnerFreezableV1, OwnableUpgradeable {
7878

7979
/// @inheritdoc IOwnerFreezableV1
8080
function ownerFrozenUntil() external view returns (uint256) {
81-
OwnerFreezableV1Storage storage s = getStorage();
81+
OwnerFreezableV17201Storage storage s = getStorage();
8282
return s.ownerFrozenUntil;
8383
}
8484

8585
/// @inheritdoc IOwnerFreezableV1
8686
function ownerFreezeAlwaysAllowedFrom(address from) external view returns (uint256) {
87-
OwnerFreezableV1Storage storage s = getStorage();
87+
OwnerFreezableV17201Storage storage s = getStorage();
8888
return s.alwaysAllowedFroms[from];
8989
}
9090

9191
/// @inheritdoc IOwnerFreezableV1
9292
function ownerFreezeAlwaysAllowedTo(address to) external view returns (uint256) {
93-
OwnerFreezableV1Storage storage s = getStorage();
93+
OwnerFreezableV17201Storage storage s = getStorage();
9494
return s.alwaysAllowedTos[to];
9595
}
9696

9797
/// @inheritdoc IOwnerFreezableV1
9898
function ownerFreezeUntil(uint256 freezeUntil) external onlyOwner {
99-
OwnerFreezableV1Storage storage s = getStorage();
99+
OwnerFreezableV17201Storage storage s = getStorage();
100100
// Freezing is additive so we can only increase the freeze time.
101101
// It is a no-op on the state if the new freeze time is less than the
102102
// current one.
@@ -118,7 +118,7 @@ abstract contract OwnerFreezable is IOwnerFreezableV1, OwnableUpgradeable {
118118
revert OwnerFreezeAlwaysAllowedFromZero(from);
119119
}
120120

121-
OwnerFreezableV1Storage storage s = getStorage();
121+
OwnerFreezableV17201Storage storage s = getStorage();
122122

123123
// Adding a `from` is additive so we can only increase the protected
124124
// time. It is a no-op on the state if the new protected time is less
@@ -134,7 +134,7 @@ abstract contract OwnerFreezable is IOwnerFreezableV1, OwnableUpgradeable {
134134

135135
/// @inheritdoc IOwnerFreezableV1
136136
function ownerFreezeStopAlwaysAllowingFrom(address from) external onlyOwner {
137-
OwnerFreezableV1Storage storage s = getStorage();
137+
OwnerFreezableV17201Storage storage s = getStorage();
138138

139139
// If the current time is after the protection for this `from` then
140140
// we can remove it. Otherwise we revert to respect the protection.
@@ -154,7 +154,7 @@ abstract contract OwnerFreezable is IOwnerFreezableV1, OwnableUpgradeable {
154154
revert IOwnerFreezableV1.OwnerFreezeAlwaysAllowedToZero(to);
155155
}
156156

157-
OwnerFreezableV1Storage storage s = getStorage();
157+
OwnerFreezableV17201Storage storage s = getStorage();
158158

159159
// Adding a `to` is additive so we can only increase the protected time.
160160
// It is a no-op on the state if the new protected time is less than the
@@ -170,7 +170,7 @@ abstract contract OwnerFreezable is IOwnerFreezableV1, OwnableUpgradeable {
170170

171171
/// @inheritdoc IOwnerFreezableV1
172172
function ownerFreezeStopAlwaysAllowingTo(address to) external onlyOwner {
173-
OwnerFreezableV1Storage storage s = getStorage();
173+
OwnerFreezableV17201Storage storage s = getStorage();
174174

175175
// If the current time is after the protection for this `to` then
176176
// we can remove it. Otherwise we revert to respect the protection.
@@ -187,7 +187,7 @@ abstract contract OwnerFreezable is IOwnerFreezableV1, OwnableUpgradeable {
187187
/// @param from The address that tokens are being sent from.
188188
/// @param to The address that tokens are being sent to.
189189
function ownerFreezeCheckTransaction(address from, address to) internal view {
190-
OwnerFreezableV1Storage storage s = getStorage();
190+
OwnerFreezableV17201Storage storage s = getStorage();
191191

192192
// We either simply revert or no-op for this check.
193193
// Revert if the contract is frozen and neither the `from` nor `to` are

0 commit comments

Comments
 (0)