Skip to content

Commit b94224d

Browse files
committed
differentiate private keys in pausable docs and add script for checking pausable state of batcher payments service contract
1 parent 015f10b commit b94224d

File tree

8 files changed

+37
-27
lines changed

8 files changed

+37
-27
lines changed

Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ unpause_all_aligned_service_manager:
9494
. contracts/scripts/unpause_aligned_service_manager.sh all
9595

9696
get_paused_state_aligned_service_manager:
97-
@echo "Getting paused state of all contracts..."
97+
@echo "Getting paused state of Aligned Service Manager contract..."
9898
. contracts/scripts/get_paused_state_aligned_service_manager.sh
9999

100100
pause_batcher_payment_service:
@@ -105,6 +105,10 @@ unpause_batcher_payment_service:
105105
@echo "Unpausing BatcherPayments contract..."
106106
. contracts/scripts/unpause_batcher_payment_service.sh
107107

108+
get_paused_state_batcher_payments_service:
109+
@echo "Getting paused state of Batcher Payments Service contract..."
110+
. contracts/scripts/get_paused_state_batcher_payments_service.sh
111+
108112
lint_contracts:
109113
@cd contracts && npm run lint:sol
110114

@@ -697,11 +701,11 @@ open_telemetry_start: ## Run open telemetry services using telemetry-docker-comp
697701

698702
telemetry_start: telemetry_run_db telemetry_ecto_migrate ## Run Telemetry API
699703
@cd telemetry_api && \
700-
./start.sh
704+
./start.sh
701705

702706
telemetry_ecto_migrate: ##
703707
@cd telemetry_api && \
704-
./ecto_setup_db.sh
708+
./ecto_setup_db.sh
705709

706710
telemetry_build_db:
707711
@cd telemetry_api && \

contracts/scripts/get_paused_state_aligned_service_manager.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ if [ -z "$ALIGNED_SERVICE_MANAGER" ]; then
55
exit 1
66
fi
77

8-
if [ -z "$PRIVATE_KEY" ]; then
9-
echo "PRIVATE_KEY env var is not set"
8+
if [ -z "$ALIGNED_SERVICE_MANAGER_PAUSER_PRIVATE_KEY" ]; then
9+
echo "ALIGNED_SERVICE_MANAGER_PAUSER_PRIVATE_KEY env var is not set"
1010
exit 1
1111
fi
1212

contracts/scripts/pause_aligned_service_manager.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ if [ -z "$ALIGNED_SERVICE_MANAGER" ]; then
1212
exit 1
1313
fi
1414

15-
if [ -z "$PRIVATE_KEY" ]; then
16-
echo "PRIVATE_KEY env var is not set"
15+
if [ -z "$ALIGNED_SERVICE_MANAGER_PAUSER_PRIVATE_KEY" ]; then
16+
echo "ALIGNED_SERVICE_MANAGER_PAUSER_PRIVATE_KEY env var is not set"
1717
exit 1
1818
fi
1919

@@ -27,7 +27,7 @@ if [[ "$1" == "all" ]]; then
2727
cast send $ALIGNED_SERVICE_MANAGER \
2828
"pauseAll()()" \
2929
--rpc-url $RPC_URL \
30-
--private-key $PRIVATE_KEY
30+
--private-key $ALIGNED_SERVICE_MANAGER_PAUSER_PRIVATE_KEY
3131
exit 0
3232
fi
3333

@@ -43,4 +43,4 @@ echo "New pause state: $result"
4343
cast send $ALIGNED_SERVICE_MANAGER \
4444
"pause(uint256)()" "$result" \
4545
--rpc-url $RPC_URL \
46-
--private-key $PRIVATE_KEY
46+
--private-key $ALIGNED_SERVICE_MANAGER_PAUSER_PRIVATE_KEY

contracts/scripts/pause_batcher_payment_service.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ if [ -z "$BATCHER_PAYMENT_SERVICE" ]; then
55
exit 1
66
fi
77

8-
if [ -z "$PRIVATE_KEY" ]; then
9-
echo "PRIVATE_KEY env var is not set"
8+
if [ -z "$BATCHER_PAYMENT_SERVICE_PAUSER_PRIVATE_KEY" ]; then
9+
echo "BATCHER_PAYMENT_SERVICE_PAUSER_PRIVATE_KEY env var is not set"
1010
exit 1
1111
fi
1212

@@ -19,4 +19,4 @@ echo "Pausing batcher payment contract"
1919
cast send $BATCHER_PAYMENT_SERVICE \
2020
"pause()()" \
2121
--rpc-url $RPC_URL \
22-
--private-key $PRIVATE_KEY
22+
--private-key $BATCHER_PAYMENT_SERVICE_PAUSER_PRIVATE_KEY

contracts/scripts/unpause_aligned_service_manager.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ if [[ "$1" == "all" ]]; then
1212
cast send $ALIGNED_SERVICE_MANAGER \
1313
"unpause(uint256)()" 0 \
1414
--rpc-url $RPC_URL \
15-
--private-key $PRIVATE_KEY
15+
--private-key $ALIGNED_SERVICE_MANAGER_PAUSER_PRIVATE_KEY
1616
return
1717
fi
1818

@@ -21,8 +21,8 @@ if [ -z "$ALIGNED_SERVICE_MANAGER" ]; then
2121
exit 1
2222
fi
2323

24-
if [ -z "$PRIVATE_KEY" ]; then
25-
echo "PRIVATE_KEY env var is not set"
24+
if [ -z "$ALIGNED_SERVICE_MANAGER_PAUSER_PRIVATE_KEY" ]; then
25+
echo "ALIGNED_SERVICE_MANAGER_PAUSER_PRIVATE_KEY env var is not set"
2626
exit 1
2727
fi
2828

@@ -42,6 +42,4 @@ echo "New pause state: $result"
4242
cast send $ALIGNED_SERVICE_MANAGER \
4343
"unpause(uint256)()" "$result" \
4444
--rpc-url $RPC_URL \
45-
--private-key $PRIVATE_KEY
46-
47-
45+
--private-key $ALIGNED_SERVICE_MANAGER_PAUSER_PRIVATE_KEY

contracts/scripts/unpause_batcher_payment_service.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ if [ -z "$BATCHER_PAYMENT_SERVICE" ]; then
55
exit 1
66
fi
77

8-
if [ -z "$PRIVATE_KEY" ]; then
9-
echo "PRIVATE_KEY env var is not set"
8+
if [ -z "$BATCHER_PAYMENT_SERVICE_PAUSER_PRIVATE_KEY" ]; then
9+
echo "BATCHER_PAYMENT_SERVICE_PAUSER_PRIVATE_KEY env var is not set"
1010
exit 1
1111
fi
1212

@@ -19,4 +19,4 @@ echo "Unpausing batcher payments contract"
1919
cast send $BATCHER_PAYMENT_SERVICE \
2020
"unpause()()" \
2121
--rpc-url $RPC_URL \
22-
--private-key $PRIVATE_KEY
22+
--private-key $BATCHER_PAYMENT_SERVICE_PAUSER_PRIVATE_KEY

docs/0_internal/pausable.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,18 @@ To run the make targets specified in this guide, you must first have the relevan
55
```
66
export RPC_URL=<rpc_url>
77
export ALIGNED_SERVICE_MANAGER=<aligned_contract_address>
8+
export ALIGNED_SERVICE_MANAGER_PAUSER_PRIVATE_KEY=<aligned_service_manager_pauser_private_key>
89
export BATCHER_PAYMENT_SERVICE=<payment_service_contract_address>
9-
export PRIVATE_KEY=<pauser_private_key>
10+
export BATCHER_PAYMENT_SERVICE_PAUSER_PRIVATE_KEY=<batcher_payment_service_pauser_private_key>
1011
```
1112

1213
## Aligned Service Manager
1314

14-
Aligned Service Manager is granulary pausable, which means you can pause the whole contract, or only specific functions. For this, Aligned uses the Pauser Registry contract provided by Eigenlayer. This contract stores the role of different accounts, so you can have X pausers and Y unpausers.
15+
Aligned Service Manager is granulary pausable, which means you can pause the whole contract, or only specific functions. For this,
16+
Aligned uses the Pauser Registry contract provided by Eigenlayer. This contract stores the role of different accounts, so
17+
you can have X pausers and Y unpausers.
1518

16-
To interact with you you can:
19+
To interact with it you can:
1720

1821
- Get current paused state:
1922
```
@@ -33,7 +36,7 @@ For example, if you want to pause functions 0, 2 and 3, you can run
3336
```
3437
contracts/scripts/pause_aligned_service_manager.sh 0 2 3
3538
```
36-
Then, if you want to unpause, for example, function 2, you must run
39+
Then, if you want to unpause, for example, function 2, you must run
3740
```
3841
contracts/scripts/unpause_aligned_service_manager.sh 0 3
3942
```
@@ -49,10 +52,15 @@ Note: the list of pausable functions and their numbers can be seen in the `Align
4952
4. depositToBatcher
5053
5. receive
5154

52-
## BatcherPayments
55+
## BatcherPaymentsService
5356

5457
BatcherPayments is also pausable, but without so much detail. You can either pause or unpause the contract running the following:
5558

59+
- Get current paused state:
60+
```
61+
make get_paused_state_batcher_payments_service
62+
```
63+
5664
```
5765
make pause_batcher_payment_service
5866
```

0 commit comments

Comments
 (0)