-
Notifications
You must be signed in to change notification settings - Fork 351
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
feat: enable whitelist of multiple operators on a single call #1491
Merged
JuArce
merged 8 commits into
staging
from
1490-feat-enable-whitelist-of-multiple-operators-on-a-single-call
Nov 26, 2024
Merged
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5d3282e
feat: update middleware submodule
uri-99 5646295
fix: update subproject commit hash to latest version
uri-99 0d68497
chore: anvil state
uri-99 2b3a7dc
fix: rename scripts in make
uri-99 dbcaff4
fix: source instead of export in whitelist.md
uri-99 b98d85a
fix: better script and make compatibility
uri-99 83a09b1
fix: remove
uri-99 b1e554b
fix: remove_from_whitelist
uri-99 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 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
2 changes: 1 addition & 1 deletion
2
contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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 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,53 @@ | ||
# Whitelist | ||
|
||
Whitelisting is a functionality added by the Aligned dev team to the `eigenlayer-middleware` contracts. | ||
|
||
This functionality is added in `contracts/lib/eigenlayer-middleware/src/Whitelist.sol`, and its functionality ends up present in the `RegistryCoordinator` contract. | ||
|
||
The reason behind this functionality is to control which Operators can operate in Aligned, making necessary for the team to manually whitelist an Operator before it can join the network. | ||
|
||
## Interacting with whitelisting | ||
|
||
### Adding an Operator | ||
|
||
There are 2 ways of adding Operators to the whitelist. | ||
|
||
To add only 1 Operator: | ||
``` | ||
make operator_whitelist OPERATOR_ADDRESS=<operator_address> | ||
``` | ||
|
||
To add a list of Operators: | ||
``` | ||
export contracts/scripts/.env | ||
contracts/scripts/operator_whitelist.sh <operator_address_1> <operator_address_2> ... <operator_address_n> | ||
``` | ||
|
||
### Removing an Operator | ||
|
||
There are 2 ways of removing Operators from the whitelist. | ||
|
||
To remove only 1 Operator: | ||
``` | ||
make operator_remove_from_whitelist OPERATOR_ADDRESS=<operator_address> | ||
``` | ||
|
||
To remove a list of Operators: | ||
``` | ||
export contracts/scripts/.env | ||
contracts/scripts/operator_remove_from_whitelist.sh <operator_address_1> <operator_address_2> ... <operator_address_n> | ||
``` | ||
|
||
### Querying the state of an Operator | ||
|
||
To view the whitelist state of an Operator you can: | ||
|
||
``` | ||
cast call <aligned_registry_coordinator_address> "isWhitelisted(address)(bool)" <operator_address> | ||
``` | ||
|
||
or in Etherscan: | ||
|
||
1. Locate the Aligned `registryCoordinator` contract address, in `aligned_deployment_output.json` | ||
2. `Read as Proxy` in Etherscan | ||
3. Find the `isWhitelisted` function, and put the Operator's address as the parameter |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Export and source were not working for me. I had to add
source scripts/.env
here.