-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: enable whitelist of multiple operators on a single call (#1491)
- Loading branch information
Showing
6 changed files
with
79 additions
and
20 deletions.
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: | ||
``` | ||
make operator_whitelist OPERATOR_ADDRESS=<operator_address1,operator_address2,...,operator_addressN> | ||
``` | ||
(Note how there is no spaces between the different operator addresses) | ||
|
||
### 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: | ||
``` | ||
make operator_remove_from_whitelist OPERATOR_ADDRESS=<operator_address1,operator_address2,...,operator_addressN> | ||
``` | ||
(Note how there is no spaces between the different operator addresses) | ||
|
||
### 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 |