-
Notifications
You must be signed in to change notification settings - Fork 52
feat: New roles for Restaker, Bug Fixes #375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pankajjagtapp
wants to merge
27
commits into
master
Choose a base branch
from
pankaj/feat/new-roles-for-restaker
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
ae97167
feat: integrate role-based access control for stETH withdrawal functi…
pankajjagtapp 9d757ff
feat: add deployment and transaction scripts for EtherFiRestaker upgr…
pankajjagtapp 771d2f3
chore: update the older scripts for compatability
pankajjagtapp 7059fae
feat: add deposit functions for stETH and wstETH to liquifier for weETH
pankajjagtapp b714912
feat: implement deposit functions for stETH and wstETH in DepositAdap…
pankajjagtapp 8d4c265
fix: simplify transfer call in depositWstETHForWeETH function by usin…
pankajjagtapp d817e34
test: increase tolerance in balance assertions for deposit functions …
pankajjagtapp 2afe3b8
chore: update fs_permissions in foundry.toml to streamline access pat…
pankajjagtapp 8ff8bc6
feat: enhance ClaimStEthWithdrawals script to automatically generate …
pankajjagtapp 72a410a
feat: integrate EtherFiRateLimiter into EtherFiRestaker for withdrawa…
pankajjagtapp f83964b
fix: legacy sciprt/tests update
pankajjagtapp 1d465ac
feat: implement rate limiter setup and verification in RestakerRolesT…
pankajjagtapp 0430ab1
refactor: rename withdrawEther to _withdrawEther for clarity and enca…
pankajjagtapp 860f2ae
feat: add EtherFiRedemptionManager deployment and upgrade logic to Re…
pankajjagtapp cabc3a8
feat: add configuration scripts for EtherFiRedemptionManager to facil…
pankajjagtapp 58128b5
feat: update EtherFiRestaker deployment script and enhance RestakerRo…
pankajjagtapp 23e0e6c
fix: adjust deposit logic in LiquidRefer to use actual transferred am…
pankajjagtapp b1f6a0c
feat: add functionality to sweep residual eETH dust to treasury after…
pankajjagtapp 6828543
chore: remove outdated redemption manager configuration files and ass…
pankajjagtapp 6fba2ab
refactor: remove role check from stEthRequestWithdrawal function to s…
pankajjagtapp cf92c75
feat: enhance RestakerRolesTransactions with depositIntoStrategy rate…
pankajjagtapp 3958e5c
chore: fix some tests or skip tests for request execution layer trigg…
pankajjagtapp 86f63f3
fix: update Redeemed event to include eEthAmountToReceiver for improv…
pankajjagtapp 41f00dc
feat: update RestakerRolesTransactions with new redemption manager im…
pankajjagtapp 70d7837
refactor: unify rate limiter constants in RestakerRolesTransactions f…
pankajjagtapp 9e71bb9
feat: add LiquidRefer implementation and enhance RestakerRolesTransac…
pankajjagtapp df5cede
feat: implement redelegate function in EtherFiRestaker with associate…
pankajjagtapp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| pragma solidity ^0.8.27; | ||
|
|
||
| import "forge-std/Script.sol"; | ||
| import {EtherFiRestaker} from "../../../src/EtherFiRestaker.sol"; | ||
| import {EtherFiRedemptionManager} from "../../../src/EtherFiRedemptionManager.sol"; | ||
| import {LiquidRefer} from "../../../src/helpers/LiquidRefer.sol"; | ||
| import {Utils} from "../../utils/utils.sol"; | ||
|
|
||
| /** | ||
| * @title DeployEtherFiRestakerAndRedemptionManagerWithRoles | ||
| * @notice Deploys the new EtherFiRestaker implementation with per-function RoleRegistry roles | ||
| * | ||
| * Constructor now takes a third arg: _roleRegistry | ||
| * | ||
| * Command: | ||
| * forge script script/upgrades/restaker-roles/deploy.s.sol --fork-url $MAINNET_RPC_URL -vvvv | ||
| */ | ||
| contract DeployEtherFiRestakerAndRedemptionManagerWithRoles is Utils { | ||
| address public etherFiRestakerImpl; | ||
| address public redemptionManagerImpl; | ||
| address public liquidReferImpl; | ||
|
|
||
| // Salt derived from a short description of this change. to update this post final audit | ||
| bytes32 commitHashSalt = keccak256("restaker-roles-v2"); | ||
|
|
||
| function run() public { | ||
| console2.log("================================================"); | ||
| console2.log("=== Deploying EtherFiRestaker + EtherFiRedemptionManager (roles upgrade) =="); | ||
| console2.log("================================================"); | ||
|
|
||
| vm.startBroadcast(); | ||
|
|
||
| { | ||
| string memory contractName = "EtherFiRestaker"; | ||
| bytes memory constructorArgs = abi.encode( | ||
| EIGENLAYER_REWARDS_COORDINATOR, | ||
| ETHERFI_REDEMPTION_MANAGER, | ||
| ROLE_REGISTRY, | ||
| ETHERFI_RATE_LIMITER | ||
| ); | ||
|
cursor[bot] marked this conversation as resolved.
cursor[bot] marked this conversation as resolved.
|
||
| bytes memory bytecode = abi.encodePacked( | ||
| type(EtherFiRestaker).creationCode, | ||
| constructorArgs | ||
| ); | ||
| etherFiRestakerImpl = deploy(contractName, constructorArgs, bytecode, commitHashSalt, true, mainnetCreate2Factory); | ||
| } | ||
| { | ||
| string memory contractName = "EtherFiRedemptionManager"; | ||
| bytes memory constructorArgs = abi.encode( | ||
| LIQUIDITY_POOL, | ||
| EETH, | ||
| WEETH, | ||
| WITHDRAW_REQUEST_NFT_BUYBACK_SAFE, | ||
| ROLE_REGISTRY, | ||
| ETHERFI_RESTAKER, | ||
| PRIORITY_WITHDRAWAL_QUEUE | ||
| ); | ||
| bytes memory bytecode = abi.encodePacked( | ||
| type(EtherFiRedemptionManager).creationCode, | ||
| constructorArgs | ||
| ); | ||
| redemptionManagerImpl = deploy(contractName, constructorArgs, bytecode, commitHashSalt, true, mainnetCreate2Factory); | ||
| } | ||
| { | ||
| string memory contractName = "LiquidRefer"; | ||
| bytes memory constructorArgs = ""; | ||
| bytes memory bytecode = abi.encodePacked( | ||
| type(LiquidRefer).creationCode | ||
| ); | ||
| liquidReferImpl = deploy(contractName, constructorArgs, bytecode, commitHashSalt, true, mainnetCreate2Factory); | ||
| } | ||
|
|
||
| vm.stopBroadcast(); | ||
|
|
||
| console2.log(""); | ||
| console2.log("=== Deployment Summary ==="); | ||
| console2.log("EtherFiRedemptionManager Implementation:", redemptionManagerImpl); | ||
| console2.log("EtherFiRestaker Implementation:", etherFiRestakerImpl); | ||
| console2.log("LiquidRefer Implementation:", liquidReferImpl); | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.