Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,12 @@ operator_whitelist_devnet:
@echo "Operator address: $(OPERATOR_ADDRESS)"
RPC_URL="http://localhost:8545" PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" OUTPUT_PATH=./script/output/devnet/alignedlayer_deployment_output.json ./contracts/scripts/whitelist_operator.sh $(OPERATOR_ADDRESS)

operator_remove_devnet:
@echo "Removing operator"
$(eval OPERATOR_ADDRESS = $(shell yq -r '.operator.address' $(CONFIG_FILE)))
@echo "Operator address: $(OPERATOR_ADDRESS)"
RPC_URL="http://localhost:8545" PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" OUTPUT_PATH=./script/output/devnet/alignedlayer_deployment_output.json ./contracts/scripts/remove_operator.sh $(OPERATOR_ADDRESS)

operator_whitelist:
@echo "Whitelisting operator $(OPERATOR_ADDRESS)"
@. contracts/scripts/.env && . contracts/scripts/whitelist_operator.sh $(OPERATOR_ADDRESS)
Expand Down
2 changes: 1 addition & 1 deletion contracts/lib/eigenlayer-middleware

Large diffs are not rendered by default.

4,532 changes: 2,229 additions & 2,303 deletions contracts/scripts/anvil/state/eigenlayer-deployed-anvil-state.json

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions contracts/scripts/remove_operator.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash

# cd to the directory of this script so that this can be run from anywhere
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
# At this point we are in contracts/scripts
cd "$parent_path"

# At this point we are in contracts
cd ../

# Check if the number of arguments is correct
if [ "$#" -ne 1 ]; then
echo "Usage: add_operator_to_whitelist.sh <OPERATOR_ADDRESS>"
exit 1
fi

OPERATOR_ADDRESS=$1

# Read the registry coordinator address from the JSON file
REGISTRY_COORDINATOR=$(jq -r '.addresses.registryCoordinator' "$OUTPUT_PATH")

# Check if the registry coordinator address is empty
if [ -z "$REGISTRY_COORDINATOR" ]; then
echo "Registry coordinator address is empty"
exit 1
fi

# Check if the Ethereum RPC URL is empty
if [ -z "$RPC_URL" ]; then
echo "Ethereum RPC URL is empty"
exit 1
fi

# Check if the private key is empty
if [ -z "$PRIVATE_KEY" ]; then
echo "Private key is empty"
exit 1
fi

# Call the add function on the contract
cast send \
--rpc-url=$RPC_URL \
--private-key=$PRIVATE_KEY \
$REGISTRY_COORDINATOR 'remove(address)' \
$OPERATOR_ADDRESS