Skip to content

Commit

Permalink
fix(ct): remove unnecessary receive and fallback functions in updater…
Browse files Browse the repository at this point in the history
… contracts
  • Loading branch information
sam-goldman committed Apr 9, 2023
1 parent 9e5ce00 commit b41ec91
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 20 deletions.
5 changes: 5 additions & 0 deletions .changeset/orange-kids-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chugsplash/contracts': patch
---

Remove unnecessary receive and fallback functions in updater contracts
4 changes: 0 additions & 4 deletions packages/contracts/contracts/interfaces/IProxyUpdater.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,4 @@ interface IProxyUpdater {
* @param _segment New value for the segment of the storage slot.
*/
function setStorage(bytes32 _key, uint8 _offset, bytes memory _segment) external;

receive() external payable;

fallback() external payable;
}
8 changes: 0 additions & 8 deletions packages/contracts/contracts/updaters/DefaultUpdater.sol
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,4 @@ contract DefaultUpdater is ProxyUpdater {
function setStorage(bytes32 _key, uint8 _offset, bytes memory _segment) external ifAdmin {
super.setStorageValue(_key, _offset, _segment);
}

receive() external payable {
revert("DefaultUpdater: caller is not an admin");
}

fallback() external payable {
revert("DefaultUpdater: cannot call implementation functions while update is in progress");
}
}
8 changes: 0 additions & 8 deletions packages/contracts/contracts/updaters/OZUUPSUpdater.sol
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,4 @@ contract OZUUPSUpdater is ProxyUpdater {
) external ifChugSplashAdmin {
super.setStorageValue(_key, _offset, _segment);
}

receive() external payable {
revert("OZUUPSUpdater: caller is not an admin");
}

fallback() external payable {
revert("OZUUPSUpdater: cannot call implementation functions while update is in progress");
}
}

0 comments on commit b41ec91

Please sign in to comment.