You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `AllocationManager` manages registration and deregistration of operators to operator sets, handles allocation and slashing of operators' slashable stake, and is the entry point an AVS uses to slash an operator. The `AllocationManager's` responsibilities are broken down into the following concepts:
25
+
The `AllocationManager` manages AVS metadata registration, registration and deregistration of operators to operator sets, handles allocation and slashing of operators' slashable stake, and is the entry point an AVS uses to slash an operator. The `AllocationManager's` responsibilities are broken down into the following concepts:
26
+
27
+
*[AVS Metadata](#avs-metadata)
26
28
*[Operator Sets](#operator-sets)
27
29
*[Allocations and Slashing](#allocations-and-slashing)
28
30
*[Config](#config)
@@ -38,6 +40,104 @@ The `AllocationManager` manages registration and deregistration of operators to
38
40
39
41
---
40
42
43
+
## AVS Metadata
44
+
45
+
AVSs must register their metadata to declare themselves who they are as the first step, before they can create operator sets or register operators into operator sets. `AllocationManager` keeps track of AVSs that have registered metadata.
46
+
47
+
**Methods:**
48
+
*[`updateAVSMetadataURI`](#updateavsmetadatauri)
49
+
50
+
51
+
#### `updateAVSMetadataURI`
52
+
53
+
```solidity
54
+
/**
55
+
* @notice Called by an AVS to emit an `AVSMetadataURIUpdated` event indicating the information has updated.
56
+
*
57
+
* @param metadataURI The URI for metadata associated with an AVS.
58
+
*
59
+
* @dev Note that the `metadataURI` is *never stored* and is only emitted in the `AVSMetadataURIUpdated` event.
60
+
*/
61
+
function updateAVSMetadataURI(
62
+
address avs,
63
+
string calldata metadataURI
64
+
)
65
+
external
66
+
checkCanCall(avs)
67
+
```
68
+
69
+
_Note: this method can be called directly by an AVS, or by a caller authorized by the AVS. See [`PermissionController.md`](../permissions/PermissionController.md) for details._
70
+
71
+
Below is the format AVSs should use when updating their metadata URI initially. This is not validated onchain.
72
+
73
+
```json
74
+
{
75
+
"name": "AVS",
76
+
"website": "https.avs.xyz/",
77
+
"description": "Some description about",
78
+
"logo": "http://github.com/logo.png",
79
+
"twitter": "https://twitter.com/avs",
80
+
}
81
+
```
82
+
83
+
84
+
Later on, once AVSs have created operator sets, content in their metadata URI can be updated subsequently.
85
+
86
+
```json
87
+
{
88
+
"name": "AVS",
89
+
"website": "https.avs.xyz/",
90
+
"description": "Some description about",
91
+
"logo": "http://github.com/logo.png",
92
+
"twitter": "https://twitter.com/avs",
93
+
"operatorSets": [
94
+
{
95
+
"name": "ETH Set",
96
+
"id": "1", // Note: we use this param to match the opSet id in the Allocation Manager
* Emits an `AVSMetadataURIUpdated` event for use in offchain services
136
+
137
+
*Requirements*:
138
+
* Caller MUST be authorized, either as the AVS itself or an admin/appointee (see [`PermissionController.md`](../permissions/PermissionController.md))
139
+
140
+
41
141
## Operator Sets
42
142
43
143
Operator sets, as described in [ELIP-002](https://github.com/eigenfoundation/ELIPs/blob/main/ELIPs/ELIP-002.md#operator-sets), are useful for AVSs to configure operator groupings which can be assigned different tasks, rewarded based on their strategy allocations, and slashed according to different rules. Operator sets are defined in [`libraries/OperatorSetLib.sol`](../../src/contracts/libraries/OperatorSetLib.sol):
@@ -145,6 +245,7 @@ Optionally, the `avs` can provide a list of `strategies`, specifying which strat
145
245
146
246
*Requirements*:
147
247
* Caller MUST be authorized, either as the AVS itself or an admin/appointee (see [`PermissionController.md`](../permissions/PermissionController.md))
248
+
* AVS MUST have registered metadata
148
249
* For each `CreateSetParams` element:
149
250
* Each `params.operatorSetId` MUST NOT already exist in `_operatorSets[avs]`
150
251
@@ -665,7 +766,6 @@ Once slashing is processed for a strategy, [slashed stake is burned via the `Del
665
766
**Methods:**
666
767
*[`setAllocationDelay`](#setallocationdelay)
667
768
*[`setAVSRegistrar`](#setavsregistrar)
668
-
*[`updateAVSMetadataURI`](#updateavsmetadatauri)
669
769
670
770
#### `setAllocationDelay`
671
771
@@ -756,79 +856,3 @@ Note that when an operator registers, registration will FAIL if the call to `IAV
756
856
757
857
*Requirements*:
758
858
* Caller MUST be authorized, either as the AVS itself or an admin/appointee (see [`PermissionController.md`](../permissions/PermissionController.md))
759
-
760
-
#### `updateAVSMetadataURI`
761
-
762
-
```solidity
763
-
/**
764
-
* @notice Called by an AVS to emit an `AVSMetadataURIUpdated` event indicating the information has updated.
765
-
*
766
-
* @param metadataURI The URI for metadata associated with an AVS.
767
-
*
768
-
* @dev Note that the `metadataURI` is *never stored* and is only emitted in the `AVSMetadataURIUpdated` event.
769
-
*/
770
-
function updateAVSMetadataURI(
771
-
address avs,
772
-
string calldata metadataURI
773
-
)
774
-
external
775
-
checkCanCall(avs)
776
-
```
777
-
778
-
_Note: this method can be called directly by an AVS, or by a caller authorized by the AVS. See [`PermissionController.md`](../permissions/PermissionController.md) for details._
779
-
780
-
Below is the format AVSs should use when updating their metadata URI. This is not validated onchain.
781
-
782
-
```json
783
-
{
784
-
"name": "AVS",
785
-
"website": "https.avs.xyz/",
786
-
"description": "Some description about",
787
-
"logo": "http://github.com/logo.png",
788
-
"twitter": "https://twitter.com/avs",
789
-
"operatorSets": [
790
-
{
791
-
"name": "ETH Set",
792
-
"id": "1", // Note: we use this param to match the opSet id in the Allocation Manager
0 commit comments