Skip to content

Commit 5d16357

Browse files
committed
feat: batcher pauser make targets
1 parent 5e067bb commit 5d16357

File tree

5 files changed

+85
-4
lines changed

5 files changed

+85
-4
lines changed

Makefile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,21 @@ anvil_add_type_hash_to_batcher_payment_service:
8383
@echo "Adding Type Hash to Batcher Payment Service..."
8484
. contracts/scripts/anvil/upgrade_add_type_hash_to_batcher_payment_service.sh
8585

86-
anvil_pause_all_aligned_service_manager:
86+
pause_all_aligned_service_manager:
8787
@echo "Pausing all contracts..."
88-
. contracts/scripts/pause.sh all
88+
. contracts/scripts/pause_aligned_service_manager.sh all
8989

90-
anvil_unpause_all_aligned_service_manager:
90+
unpause_all_aligned_service_manager:
9191
@echo "Pausing all contracts..."
92-
. contracts/scripts/unpause.sh all
92+
. contracts/scripts/unpause_aligned_service_manager.sh all
93+
94+
pause_batcher_payment_service:
95+
@echo "Pausing BatcherPayments contract..."
96+
. contracts/scripts/pause_batcher_payment_service.sh
97+
98+
unpause_batcher_payment_service:
99+
@echo "Unpausing BatcherPayments contract..."
100+
. contracts/scripts/unpause_batcher_payment_service.sh
93101

94102
lint_contracts:
95103
@cd contracts && npm run lint:sol

contracts/scripts/pause.sh renamed to contracts/scripts/pause_aligned_service_manager.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ if [ -z "$1" ]; then
77
exit 1
88
fi
99

10+
if [ -z "$ALIGNED_SERVICE_MANAGER" ]; then
11+
echo "ALIGNED_SERVICE_MANAGER env var is not set"
12+
exit 1
13+
fi
14+
15+
if [ -z "$PRIVATE_KEY" ]; then
16+
echo "PRIVATE_KEY env var is not set"
17+
exit 1
18+
fi
19+
20+
if [ -z "$RPC_URL" ]; then
21+
echo "RPC_URL env var is not set"
22+
exit 1
23+
fi
24+
1025
if [[ "$1" == "all" ]]; then
1126
echo "Pausing whole contract"
1227
cast send $ALIGNED_SERVICE_MANAGER \
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
if [ -z "$BATCHER_PAYMENT_SERVICE" ]; then
4+
echo "BATCHER_PAYMENT_SERVICE env var is not set"
5+
exit 1
6+
fi
7+
8+
if [ -z "$PRIVATE_KEY" ]; then
9+
echo "PRIVATE_KEY env var is not set"
10+
exit 1
11+
fi
12+
13+
if [ -z "$RPC_URL" ]; then
14+
echo "RPC_URL env var is not set"
15+
exit 1
16+
fi
17+
18+
echo "Pausing batcher payment contract"
19+
cast send $BATCHER_PAYMENT_SERVICE \
20+
"pause()()" \
21+
--rpc-url $RPC_URL \
22+
--private-key $PRIVATE_KEY

contracts/scripts/unpause.sh renamed to contracts/scripts/unpause_aligned_service_manager.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,20 @@ if [[ "$1" == "all" ]]; then
1616
return
1717
fi
1818

19+
if [ -z "$ALIGNED_SERVICE_MANAGER" ]; then
20+
echo "ALIGNED_SERVICE_MANAGER env var is not set"
21+
exit 1
22+
fi
23+
24+
if [ -z "$PRIVATE_KEY" ]; then
25+
echo "PRIVATE_KEY env var is not set"
26+
exit 1
27+
fi
28+
29+
if [ -z "$RPC_URL" ]; then
30+
echo "RPC_URL env var is not set"
31+
exit 1
32+
fi
1933

2034
result=0
2135

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
if [ -z "$BATCHER_PAYMENT_SERVICE" ]; then
4+
echo "BATCHER_PAYMENT_SERVICE env var is not set"
5+
exit 1
6+
fi
7+
8+
if [ -z "$PRIVATE_KEY" ]; then
9+
echo "PRIVATE_KEY env var is not set"
10+
exit 1
11+
fi
12+
13+
if [ -z "$RPC_URL" ]; then
14+
echo "RPC_URL env var is not set"
15+
exit 1
16+
fi
17+
18+
echo "Unpausing batcher payments contract"
19+
cast send $BATCHER_PAYMENT_SERVICE \
20+
"unpause()()" \
21+
--rpc-url $RPC_URL \
22+
--private-key $PRIVATE_KEY

0 commit comments

Comments
 (0)