Multiple varied scripts for operational tasks#378
Multiple varied scripts for operational tasks#378pankajjagtapp wants to merge 9 commits intomasterfrom
Conversation
…tETH redemption manager
…uling and reverting scripts
…e and user fee settings
…iquidity decisions and rate limits
…ions, exits, and unrestaking
📊 Forge Coverage ReportGenerated by workflow run #690 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a9198f0. Configure here.
| keccak256("CONSOLIDATION_REQUEST_LIMIT_ID"); | ||
|
|
||
| uint256 internal constant FULL_EXIT_GWEI = 2_048_000_000_000; | ||
| uint256 internal constant SECONDS_PER_DAY = 86_400; |
There was a problem hiding this comment.
Unused SECONDS_PER_DAY constant in rate-limit scripts
Low Severity
SECONDS_PER_DAY is declared in both ReduceRateLimits.s.sol and RaiseRateLimits.s.sol but is never referenced in the code. The refill-rate divisions (e.g., 1_064_960_000_000_000 / 86_400) were computed offline and hardcoded as constants, leaving SECONDS_PER_DAY as dead code.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit a9198f0. Configure here.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a9198f0ad2
ℹ️ 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".
| ICreate2Factory constant mainnetCreate2Factory = ICreate2Factory(0x356d1B83970CeF2018F2c9337cDdb67dff5AEF99); | ||
|
|
||
| uint256 constant MIN_DELAY_OPERATING_TIMELOCK = 28800; // 8 hours | ||
| uint256 constant MIN_DELAY_OPERATING_TIMELOCK = 172800; // 2 days |
There was a problem hiding this comment.
Keep operating timelock delay aligned with production value
Changing MIN_DELAY_OPERATING_TIMELOCK from 28,800 to 172,800 in the shared Utils base alters every script that schedules through this constant to a 2-day delay, while the operational flow in this repo still assumes 8 hours (including the newly added whale-ops runbook). In practice this creates schedule/execute mismatches where execute transactions are attempted on the old window and revert as not-ready, delaying critical ops by an extra 40 hours. This shared constant should remain consistent with the actual timelock delay (or be read dynamically from getMinDelay()).
Useful? React with 👍 / 👎.
| uint256 stEthAfter = IERC20(lido).balanceOf(address(restaker)); | ||
| console2.log("stETH received:", stEthAfter - stEthBefore); | ||
|
|
||
| uint256 depositAmount = IERC20(lido).balanceOf(address(restaker)); |
There was a problem hiding this comment.
Avoid encoding a stale stETH deposit amount in STEP=2 batch
depositAmount is snapshotted during fork simulation and then hardcoded into the generated depositIntoStrategy calldata, but STEP=2 is executed later in production after a waiting period; if the restaker’s stETH balance changes in the meantime (e.g., redemptions or accounting drift), the batch can either fail on tx3 (insufficient balance) or leave funds undeployed. This makes the multi-tx redelegation flow brittle and should be replaced with a runtime balance-based deposit step.
Useful? React with 👍 / 👎.
…g stETH withdrawals


Note
Medium Risk
While these are primarily off-chain
forgescripts, they generate and simulate admin/timelock transactions that can materially change mainnet parameters (rate limiter buckets, redemption capacity/fees, whitelist and restaker actions). The update toMIN_DELAY_OPERATING_TIMELOCK(8h→2d) also changes scheduling assumptions for any scripts depending on it.Overview
Adds several new
forgeoperation scripts that generate batched Gnosis Safe JSON and fork simulations for mainnet ops: priority-queue admin/tag updates and whitelist/fee adjustments (OperationsBatch,WhitelistUsers), rate-limiter capacity/refill changes for consolidations/exits/unrestaking (RaiseRateLimits,ReduceRateLimits), and multiple stETH/EigenLayer restaker workflows (complete+queue stETH withdrawals, claim Lido withdrawals with Safe JSON output, and a 2-step stETH redelegation).Also adds timelock-driven scripts to temporarily raise
EtherFiRedemptionManagerstETH redemption capacity/fees (with pre-scheduled revert and fork redemption tests), includes an example Safe JSON forcomplete-and-queue-steth-withdrawal, broadensfoundry.tomlFS permissions to all ofscript/operations, and changesMIN_DELAY_OPERATING_TIMELOCKinUtilsfrom 8 hours to 2 days.Reviewed by Cursor Bugbot for commit d0633cd. Bugbot is set up for automated code reviews on this repo. Configure here.