@@ -6,13 +6,20 @@ import { IndexingAgreement } from "./IndexingAgreement.sol";
6
6
library UnsafeDecoder {
7
7
/**
8
8
* @notice See {Decoder.decodeCollectIndexingFeeData}
9
+ * @param data The data to decode
10
+ * @return agreementId The agreement ID
11
+ * @return nestedData The nested encoded data
9
12
*/
10
13
function decodeCollectIndexingFeeData_ (bytes calldata data ) public pure returns (bytes16 , bytes memory ) {
11
14
return abi.decode (data, (bytes16 , bytes ));
12
15
}
13
16
14
17
/**
15
18
* @notice See {Decoder.decodeRCAMetadata}
19
+ * @dev The data should be encoded as {IndexingAgreement.AcceptIndexingAgreementMetadata}
20
+ * @param data The data to decode
21
+ * @return The decoded data
22
+ *
16
23
*/
17
24
function decodeRCAMetadata_ (
18
25
bytes calldata data
@@ -22,6 +29,9 @@ library UnsafeDecoder {
22
29
23
30
/**
24
31
* @notice See {Decoder.decodeRCAUMetadata}
32
+ * @dev The data should be encoded as {IndexingAgreement.UpdateIndexingAgreementMetadata}
33
+ * @param data The data to decode
34
+ * @return The decoded data
25
35
*/
26
36
function decodeRCAUMetadata_ (
27
37
bytes calldata data
@@ -31,6 +41,11 @@ library UnsafeDecoder {
31
41
32
42
/**
33
43
* @notice See {Decoder.decodeCollectIndexingFeeDataV1}
44
+ * @dev The data should be encoded as (uint256 entities, bytes32 poi, uint256 epoch)
45
+ * @param data The data to decode
46
+ * @return entities The number of entities indexed
47
+ * @return poi The proof of indexing
48
+ * @return epoch The current epoch
34
49
*/
35
50
function decodeCollectIndexingFeeDataV1_ (
36
51
bytes memory data
@@ -40,6 +55,9 @@ library UnsafeDecoder {
40
55
41
56
/**
42
57
* @notice See {Decoder.decodeIndexingAgreementTermsV1}
58
+ * @dev The data should be encoded as {IndexingAgreement.IndexingAgreementTermsV1}
59
+ * @param data The data to decode
60
+ * @return The decoded indexing agreement terms
43
61
*/
44
62
function decodeIndexingAgreementTermsV1_ (
45
63
bytes memory data
0 commit comments