Skip to content

Commit 990ec1d

Browse files
PatStilesuri-99avilagaston9
authored
Feat(docs): Docs for Operator Whitelisting with Multisig (#1526)
Co-authored-by: Urix <[email protected]> Co-authored-by: avilagaston9 <[email protected]>
1 parent 7a15d39 commit 990ec1d

34 files changed

+340
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Whitelist Operators
2+
This doc contains a guide on how to Whitelist Operators in Aligned.
3+
4+
To run the make targets specified in this guide, you must first set the following env vars within `./contracts/scripts/.env.<NETWORK>`:
5+
```
6+
RPC_URL=<rpc_url>
7+
OUTPUT_PATH=<aligned_deployment_output_file_path>
8+
PRIVATE_KEY=<registry_coordinator_owner_private_key>
9+
```
10+
11+
## Without Multisig
12+
13+
### Adding to Whitelist
14+
15+
You can whitelist a single Operator as following:
16+
```
17+
make operator_whitelist OPERATOR_ADDRESS=<operator_address>
18+
```
19+
20+
Or you can whitelist multiple Operators as following:
21+
```
22+
make operator_whitelist OPERATOR_ADDRESS=<operator_address1,operator_address2,...,operator_addressN>
23+
```
24+
25+
Note how there are no spaces between the commas that separate each Operator address.
26+
27+
For example:
28+
```
29+
make operator_whitelist OPERATOR_ADDRESS=0x70997970C51812dc3A010C7d01b50e0d17dc79C8,0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC,0x90F79bf6EB2c4f870365E785982E1f101E93b906
30+
```
31+
32+
### Removing from Whitelist
33+
34+
You can remove from whitelist a single Operator as following:
35+
```
36+
make operator_remove_from_whitelist OPERATOR_ADDRESS=<operator_address>
37+
```
38+
39+
Or you can remove from whitelist multiple Operators as following:
40+
```
41+
make operator_remove_from_whitelist OPERATOR_ADDRESS=<operator_address1,operator_address2,...,operator_addressN>
42+
```
43+
44+
Note how there are no spaces between the commas that separate each Operator address.
45+
46+
For example:
47+
```
48+
make operator_remove_from_whitelist OPERATOR_ADDRESS=0x70997970C51812dc3A010C7d01b50e0d17dc79C8,0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC,0x90F79bf6EB2c4f870365E785982E1f101E93b906
49+
```
50+
51+
### Viewing Operator Whitelist status
52+
53+
```bash
54+
cast call --rpc-url <RPC_URL> <REGISTRY_COORDINATOR_ADDRESS> "isWhitelisted(address)" <OPERATOR_ADDRESS>
55+
```
56+
57+
58+
## With Multisig
59+
60+
To add or remove Operators from the Whitelist using a Multisig, you can follow the next [guide](./5_b_1_propose_whitelist.md)
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Propose the Transaction for Whitelisting Operators using Multisig
2+
3+
If you want to Whitelist Operators, you can propose the whitelist operator transaction using the multisig wallet.
4+
5+
## Prerequisites
6+
7+
- You need to have deployed the contracts following the [Deploy Contracts Guide](./2_deploy_contracts.md).
8+
9+
## Propose transaction for Whitelist Operators
10+
11+
To propose the whitelist transaction you can follow the steps below:
12+
13+
1. Go to [Safe](https://app.safe.global/home)
14+
15+
2. Click on `New transaction` -> `Transaction Builder`
16+
17+
![New transaction](./images/5_b_1_whitelist_operator_1.png)
18+
19+
![Transaction Builder](./images/5_b_1_whitelist_operator_2.png)
20+
21+
3. Get the `registryCoordinator` address from ```contracts/script/output/mainnet/alignedlayer_deployment_output.json``` or ```contracts/script/output/holesky/alignedlayer_deployment_output.json``` or ```contracts/script/output/sepolia/alignedlayer_deployment_output.json```
22+
23+
4. Paste the `registryCoordinator` address on `Enter Address or ENS Name`
24+
25+
![](./images/5_b_1_whitelist_operator_3.png)
26+
27+
5. As this is a Proxy contract, choose `Use Implementation ABI`
28+
29+
![Use Implementation ABI](./images/5_b_1_whitelist_operator_4.png)
30+
31+
If `Use Implementation ABI`, did not show up you will need to submit the call via raw calldata. Consult this alternative [guide](./5_b_1b_propose_whitelist_with_call_data.md)
32+
33+
6. In `Contract Method Selector` choose `add_multiple()` in the `_addresses(address[])` field, enter the operator addresses in the following format `[<OPERATOR_ADDRESS>, ..., <OPERATOR_ADDRESS>]` for example, `[0000000000000000000000000000000000000009, 0000000000000000000000000000000000000003]`
34+
35+
![Choose the add_multiple()](./images/5_b_1_whitelist_operator_5.png)
36+
37+
7. Click on `+ Add new transaction`
38+
39+
You should see the new transaction to be executed
40+
41+
![alt text](./images/5_b_1_whitelist_operator_6.png)
42+
43+
8. Click on `Create batch` to create the transaction.
44+
45+
![alt text](./images/5_b_1_whitelist_operator_7.png)
46+
47+
9. Simulate the transaction by clicking on `Simulate`
48+
49+
![alt text](./images/5_b_1_whitelist_operator_8.png)
50+
51+
10. If everything is correct, click on `Send batch` to send the transaction.
52+
53+
11. Simulate the transaction, and if everything is correct, click on `Sign`.
54+
55+
![alt text](./images/5_b_1_whitelist_operator_9.png)
56+
57+
12. Wait for the transaction to be executed. You can check the transaction status on the `Transactions` tab.
58+
59+
13. If the transaction is correctly created, you have to wait until the required Multisig member signs the transaction to send it. For this, you can follow [the following guide](./5_b_2_approve_whitelist.md)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Turn on the `Custom Data` flag.
2+
![alt text](./images/5_b_1b_whitelist_operator_with_call_data_1.png)
3+
4+
Generate the call data for function to white list an operator ```add_multiple(address[])``` by running:
5+
6+
```bash
7+
cast calldata "add_multiple(address[])" "[<OPERATOR_ADDRESS>, ...]"
8+
```
9+
10+
For example:
11+
```bash
12+
cast calldata "add_multiple(address[])" "[0x0000000000000000000000000000000000000009, 0x0000000000000000000000000000000000000003]"
13+
```
14+
will display ```0x6c7089040000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000090000000000000000000000000000000000000000000000000000000000000003```
15+
16+
Confirm the calldata starts with the correct function identifier ```0x6c708904```.
17+
18+
In `Data` field paste the previously generated call data. Also check the `To Address` is the correct `registryCoordinator` address, and the `ETH value` should be set to `0`.
19+
20+
![alt text](./images/5_b_1b_whitelist_operator_with_call_data_2.png)
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Approve the Whitelist Transaction
2+
3+
Once the transaction is proposed, the multisig owners must approve the transaction.
4+
5+
## Approve the Whitelist for registryCoordinator
6+
7+
1. Go to [Safe](https://app.safe.global/home) and connect your wallet.
8+
9+
2. Go to the `Transactions` tab and find the transaction that was proposed.
10+
11+
3. Get the ```add_multiple(address[])``` signature by running:
12+
13+
```bash
14+
cast calldata "add_multiple(address[])" "[<OPERATOR_ADDRESS>, ...]"
15+
```
16+
17+
For example:
18+
```bash
19+
cast calldata "add_multiple(address[])" "[0x0000000000000000000000000000000000000009, 0x0000000000000000000000000000000000000003]"
20+
```
21+
will display ```0x6c7089040000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000090000000000000000000000000000000000000000000000000000000000000003```
22+
23+
Confirm the calldata starts with the correct function identifier ```0x6c708904```.
24+
25+
4. Click on the transaction, and then click on ```Advanced Details```.
26+
27+
![Check details](images/5_b_2_whitelist_operator_1.png)
28+
29+
5. Copy the ```Raw Data```, paste it in a text editor and verify it is the same value as the one you got in step 3.
30+
31+
6. If the data is correct, click on the `Confirm` button.
32+
33+
7. Simulate the transaction. If everything is correct, click on the `Sign` button.
34+
35+
![Sign transaction](images/5_b_2_whitelist_operator_2.png)
36+
37+
8. Once the transaction is executed, the operator will be whitelisted within the `registryCoordinator` contract.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Propose the Transaction for Removing Operators using Multisig
2+
3+
If you want to Removing Operators, you can propose the remove operator transaction using the multisig wallet.
4+
5+
## Prerequisites
6+
7+
- You need to have deployed the contracts following the [Deploy Contracts Guide](./2_deploy_contracts.md).
8+
9+
## Propose transaction for Removing Operators
10+
11+
To propose a remove operator from whitelist transaction you can follow the steps below:
12+
13+
1. Go to [Safe](https://app.safe.global/home)
14+
15+
2. Click on `New transaction` -> `Transaction Builder`
16+
17+
![New transaction](./images/5_b_3_remove_operator_1.png)
18+
19+
![Transaction Builder](./images/5_b_3_remove_operator_2.png)
20+
21+
3. Get the `registryCoordinator` address from ```contracts/script/output/mainnet/alignedlayer_deployment_output.json``` or ```contracts/script/output/holesky/alignedlayer_deployment_output.json``` or ```contracts/script/output/sepolia/alignedlayer_deployment_output.json```
22+
23+
4. Paste the `registryCoordinator` address on `Enter Address or ENS Name`
24+
25+
![](./images/5_b_3_remove_operator_3.png)
26+
27+
5. As this is a Proxy contract, choose `Use Implementation ABI`
28+
29+
![Use Implementation ABI](./images/5_b_3_remove_operator_4.png)
30+
31+
If `Use Implementation ABI`, did not show up you will need to submit the call via raw calldata. Consult this this alternative [guide](./5_b_3b_propose_remove_operator_with_call_data.md)
32+
33+
6. In `contract method selector` choose `remove_multiple()` in the `_addresses(address[])` field, enter the operator addresses in the following format `[<OPERATOR_ADDRESS>, ..., <OPERATOR_ADDRESS>]` for example, `[0000000000000000000000000000000000000009, 0000000000000000000000000000000000000003]`
34+
35+
![Choose the add_multiple()](./images/5_b_3_remove_operator_5.png)
36+
37+
7. Click on `+ Add new transaction`
38+
39+
You should see the new transaction to be executed
40+
41+
![alt text](./images/5_b_3_remove_operator_6.png)
42+
43+
8. Click on `Create Batch` to create the transaction.
44+
45+
![alt text](./images/5_b_3_remove_operator_7.png)
46+
47+
9. Simulate the transaction by clicking on `Simulate`
48+
49+
![alt text](./images/5_b_3_remove_operator_8.png)
50+
51+
10. If everything is correct, click on `Send batch` to send the transaction.
52+
53+
11. Simulate the transaction, and if everything is correct, click on `Sign`.
54+
55+
![alt text](./images/5_b_3_remove_operator_9.png)
56+
57+
12. Wait for the transaction to be executed. You can check the transaction status on the `Transactions` tab.
58+
59+
13. If the transaction is correctly created, you have to wait until the required Multisig member signs the transaction to send it. For this, you can follow [the following guide](./5_b_4_approve_remove_operator.md)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Turn on the `Custom Data` flag.
2+
![alt text](./images/5_b_3b_remove_operator_with_call_data_1.png)
3+
4+
Generate the call data for function to white list an operator ```remove_multiple(address[])``` by running:
5+
6+
```bash
7+
cast calldata "remove_multiple(address[])" "[<OPERATOR_ADDRESS>, ...]"
8+
```
9+
10+
For example:
11+
```bash
12+
cast calldata "remove_multiple(address[])" "[0x0000000000000000000000000000000000000009, 0x0000000000000000000000000000000000000003]"
13+
```
14+
15+
will display ```0x53abfad40000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000090000000000000000000000000000000000000000000000000000000000000003```
16+
17+
Confirm the calldata starts with the correct function identifier ```0x53abfad4```.
18+
19+
In `Data` field paste the previously generated call data. Also check the `To Address` is the correct `registryCoordinator` address, and the `ETH value` should be set to `0`.
20+
21+
![alt text](./images/5_b_3b_remove_operator_with_call_data_2.png)
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Approve the Remove Operator Transaction
2+
3+
Once the transaction is proposed, the multisig owners must approve the transaction.
4+
5+
## Approve the Remove Operator for registryCoordinator
6+
7+
1. Go to [Safe](https://app.safe.global/home) and connect your wallet.
8+
9+
2. Go to the `Transactions` tab and find the transaction that was proposed.
10+
11+
3. Get the ```remove_multiple(address[])``` signature by running:
12+
13+
```bash
14+
cast calldata "remove_multiple(address[])" "[<OPERATOR_ADDRESS>, ...]"
15+
```
16+
17+
For example:
18+
```bash
19+
cast calldata "remove_multiple(address[])" "[0x0000000000000000000000000000000000000009, 0x0000000000000000000000000000000000000003]"
20+
```
21+
will display ```0x53abfad40000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000090000000000000000000000000000000000000000000000000000000000000003```
22+
23+
Confirm the calldata starts with the correct function identifier ```0x53abfad4```.
24+
25+
4. Click on the transaction, and then click on ```Advanced Details```.
26+
27+
![Check details](images/5_b_4_remove_operator_1.png)
28+
29+
5. Copy the ```Raw Data```, paste it in a text editor and verify it is the same value as the one you got in step 3.
30+
31+
6. If the data is correct, click on the `Confirm` button.
32+
33+
7. Simulate the transaction. If everything is correct, click on the `Sign` or `Execute` (if you are the last signer) button.
34+
35+
![Sign transaction](images/5_b_4_remove_operator_2.png)
36+
37+
8. Once the transaction is executed, the operator will be removed within the `registryCoordinator` contract.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Whitelist Operators with a Multisig
2+
3+
> [!WARNING]
4+
> Safe Multisig Wallet is not currently supported in Holesky Testnet.
5+
> For this reason, we deployed EigenLayer contracts in Sepolia to test the upgrade on AlignedLayer Contracts.
6+
7+
> [!NOTE]
8+
> EigenLayer Sepolia contracts information is available in `contracts/script/output/sepolia/eigenlayer_deployment_output.json`.
9+
10+
> [!NOTE]
11+
> You can find a guide on how to Deploy the contracts [here](./2_deploy_contracts.md).
12+
13+
This guide is for Whitelisting Operators using a Multisig wallet. If you deployed the contract without a Multisig wallet, you can follow the [Whitelist Operators](./5_a_whitelist_operators.md) tutorial.
14+
15+
In this guide we add and remove Operators from Aligned's Whitelist using a multisig wallet.
16+
17+
## Prerequisites
18+
19+
- You need to have installed
20+
- git
21+
- make
22+
- [jq](https://jqlang.github.io/jq/download/)
23+
24+
- Clone the repository
25+
26+
```
27+
git clone https://github.com/yetanotherco/aligned_layer.git
28+
```
29+
30+
- Install foundry
31+
32+
```shell
33+
make install_foundry
34+
foundryup -v nightly-a428ba6ad8856611339a6319290aade3347d25d9
35+
```
36+
37+
## Steps for Whitelisting an Operator
38+
39+
1. Propose the transaction with the multisig following the [Propose Whitelist Guide](./5_b_1_propose_whitelist.md).
40+
41+
2. After the Whitelist is proposed, multisig participants can approve the whitelist transaction following the [Approve Whitelist Guide](./5_b_2_approve_whitelist.md).
42+
43+
## Steps for Removing an Operator
44+
45+
1. Propose the transaction with the multisig following the [Propose Remove Whitelist Guide](./5_b_3_propose_remove_whitelist.md).
46+
47+
2. After the unpause is proposed, multisig participants can approve the remove following the [Approve Remove Whitelist Guide](./5_b_4_approve_remove_whitelist.md).
535 KB
Loading
310 KB
Loading

0 commit comments

Comments
 (0)