|
| 1 | +# Pausable |
| 2 | +This doc contains a guide on how to use the Pausable functionality of Aligned. |
| 3 | + |
| 4 | +## Aligned Service Manager |
| 5 | + |
| 6 | +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. |
| 7 | + |
| 8 | +To interact with you you can: |
| 9 | + |
| 10 | +- Get current paused state: |
| 11 | +``` |
| 12 | +make get_paused_state_aligned_service_manager |
| 13 | +``` |
| 14 | + |
| 15 | +- Pause or Unpause the whole aligned service manager contract: |
| 16 | +``` |
| 17 | +make pause_all_aligned_service_manager |
| 18 | +``` |
| 19 | +``` |
| 20 | +make unpause_all_aligned_service_manager |
| 21 | +``` |
| 22 | + |
| 23 | +- Pause only specific functions, receiving a list of the functions to pause/remain paused: |
| 24 | +For example, if you want to pause functions 0, 2 and 3, you can run |
| 25 | +``` |
| 26 | +contracts/scripts/pause_aligned_service_manager.sh 0 2 3 |
| 27 | +``` |
| 28 | +Then, if you want to unpause, for example, function 2, you must run |
| 29 | +``` |
| 30 | +contracts/scripts/unpause_aligned_service_manager.sh 0 3 |
| 31 | +``` |
| 32 | + |
| 33 | +Note: when executing a Pause, you can only ADD functions to the paused list, and when executing an Unpause, you can only REMOVE functions from the paused list. This is because the base pausable contract has different ACL for Pausers and Unpausers. |
| 34 | + |
| 35 | +Note: the list of pausable functions and their numbers can be seen in the `AlignedLayerServiceManager.sol` contract. But the list is the following: |
| 36 | + |
| 37 | +0. createNewTask |
| 38 | +1. respondToTaskV2 |
| 39 | +2. verifyBatchInclusion |
| 40 | +3. withdraw |
| 41 | +4. depositToBatcher |
| 42 | +5. receive |
| 43 | + |
| 44 | +## BatcherPayments |
| 45 | + |
| 46 | +BatcherPayments is also pausable, but without so much detail. You can either pause or unpause the contract running the following: |
| 47 | + |
| 48 | +``` |
| 49 | +make pause_batcher_payment_service |
| 50 | +``` |
| 51 | +``` |
| 52 | +make unpause_batcher_payment_service |
| 53 | +``` |
| 54 | + |
| 55 | +And this will either pause or unpause the following functions: |
| 56 | +- createNewTask |
| 57 | +- unlock |
| 58 | +- lock |
| 59 | +- withdraw |
0 commit comments