feat/pause-transfers#381
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5354d9da24
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
📊 Forge Coverage ReportGenerated by workflow run #696 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 97e520b. Configure here.
pankajjagtapp
left a comment
There was a problem hiding this comment.
Can you use an available library for PausedUntil logic? Just flagging that need to be aware of storage variable corruption with the library
there's no existing librray I can find in OZ or Solady. Also what we've implemented is quite custom so I think it's better to not use a library. also with custom logic we ensure no slot collision. |
| require(_user != address(0), "No zero addresses"); | ||
| require(roleRegistry.hasRole(EETH_PAUSER_UNTIL_ROLE, msg.sender), "IncorrectRole"); | ||
| if (pausedUntil[_user] < block.timestamp) { | ||
| pausedUntil[_user] = uint64(block.timestamp) + 1 days; |
There was a problem hiding this comment.
The 1 days hard coded should be a configurable value
|
|
||
| contract WeETH is ERC20Upgradeable, UUPSUpgradeable, OwnableUpgradeable, ERC20PermitUpgradeable, IRateProvider, AssetRecovery { | ||
|
|
||
| IRoleRegistry public immutable roleRegistry; |
There was a problem hiding this comment.
can we refactor the other parts to follow the same pattern?
Use public immutable constants instead of putting the contracts are state variables.
There was a problem hiding this comment.
yes we can. will make a separate PR for that.

Note
High Risk
Touches core token transfer/mint/burn and wrapping flows and changes proxy wiring (constructor/initializer + storage layout via deprecated slots), so misconfiguration or logic edge cases could halt user movements or deposits.
Overview
Adds a hybrid pausing mechanism to
EETHandWeETH: a globalpausedswitch plus per-addresspausedUntilfreezes, gated by new roles (*_PAUSER_ROLE,*_PAUSER_UNTIL_ROLE) and emitting pause/unpause events.All value-moving paths are now restricted:
EETHblocks_transferSharesand alsomintShares/burnShareswhen paused or when the relevant address is time-frozen;WeETHenforces the same checks via_beforeTokenTransfer, covering transfers as well as wrap/unwrap mint/burn flows.Refactors construction/initialization to move
liquidityPool(andeETHforWeETH) to constructor-set immutables, leavingDEPRECATED_*storage slots for upgrade compatibility; interfaces andTestSetupare updated accordingly. Adds extensive new pause-focused unit+fuzz test suites (EETHPause.t.sol,WeETHPause.t.sol).Reviewed by Cursor Bugbot for commit a865ab4. Bugbot is set up for automated code reviews on this repo. Configure here.