@@ -21,12 +21,6 @@ library IndexingAgreement {
21
21
V1
22
22
}
23
23
24
- struct Manager {
25
- mapping (bytes16 => State) agreements;
26
- mapping (bytes16 agreementId = > IndexingAgreementTermsV1 data ) termsV1;
27
- mapping (address allocationId = > bytes16 agreementId ) allocationToActiveAgreementId;
28
- }
29
-
30
24
/**
31
25
* @notice Indexer Agreement Data
32
26
* @param allocationId The allocation ID
@@ -80,7 +74,16 @@ library IndexingAgreement {
80
74
bytes data;
81
75
}
82
76
83
- bytes32 private constant INDEXING_AGREEMENT_MANAGER_STORAGE_V1_SLOT = keccak256 ("v1.manager.indexing-agreement " );
77
+ /// @custom:storage-location erc7201:graphprotocol.subgraph-service.storage.Manager.IndexingAgreement
78
+ struct Manager {
79
+ mapping (bytes16 => State) agreements;
80
+ mapping (bytes16 agreementId = > IndexingAgreementTermsV1 data ) termsV1;
81
+ mapping (address allocationId = > bytes16 agreementId ) allocationToActiveAgreementId;
82
+ }
83
+
84
+ // keccak256(abi.encode(uint256(keccak256("graphprotocol.subgraph-service.storage.Manager.IndexingAgreement")) - 1)) & ~bytes32(uint256(0xff))
85
+ bytes32 private constant INDEXING_AGREEMENT_MANAGER_STORAGE_LOCATION =
86
+ 0xfdb6fb5d1a390e01387ce73642e517880d8e0fedd0e7e26ac9194788a7a85200 ;
84
87
85
88
/**
86
89
* @notice Emitted when an indexer collects indexing fees from a V1 agreement
@@ -384,12 +387,10 @@ library IndexingAgreement {
384
387
return wrapper;
385
388
}
386
389
387
- function _getManager () internal pure returns (Manager storage manager ) {
388
- bytes32 slot = INDEXING_AGREEMENT_MANAGER_STORAGE_V1_SLOT;
389
-
390
+ function _getManager () internal pure returns (Manager storage $) {
390
391
// solhint-disable-next-line no-inline-assembly
391
392
assembly {
392
- manager .slot := slot
393
+ $ .slot := INDEXING_AGREEMENT_MANAGER_STORAGE_LOCATION
393
394
}
394
395
}
395
396
0 commit comments