@@ -12,17 +12,6 @@ import { IGraphPayments } from "./IGraphPayments.sol";
12
12
* payments using a GraphTally RAV (Receipt Aggregate Voucher).
13
13
*/
14
14
interface IGraphTallyCollector is IPaymentsCollector {
15
- /// @notice Details for a payer-signer pair
16
- /// @dev Signers can be removed only after a thawing period
17
- struct PayerAuthorization {
18
- // Payer the signer is authorized to sign for
19
- address payer;
20
- // Timestamp at which thawing period ends (zero if not thawing)
21
- uint256 thawEndTimestamp;
22
- // Whether the signer authorization was revoked
23
- bool revoked;
24
- }
25
-
26
15
/// @notice The Receipt Aggregate Voucher (RAV) struct
27
16
struct ReceiptAggregateVoucher {
28
17
// The ID of the collection "bucket" the RAV belongs to. Note that multiple RAVs can be collected for the same collection id.
@@ -50,36 +39,6 @@ interface IGraphTallyCollector is IPaymentsCollector {
50
39
bytes signature;
51
40
}
52
41
53
- /**
54
- * @notice Emitted when a signer is authorized to sign RAVs for a payer
55
- * @param payer The address of the payer authorizing the signer
56
- * @param authorizedSigner The address of the authorized signer
57
- */
58
- event SignerAuthorized (address indexed payer , address indexed authorizedSigner );
59
-
60
- /**
61
- * @notice Emitted when a signer is thawed to be removed from the authorized signers list
62
- * @param payer The address of the payer thawing the signer
63
- * @param authorizedSigner The address of the signer to thaw
64
- * @param thawEndTimestamp The timestamp at which the thawing period ends
65
- */
66
- event SignerThawing (address indexed payer , address indexed authorizedSigner , uint256 thawEndTimestamp );
67
-
68
- /**
69
- * @dev Emitted when the thawing of a signer is cancelled
70
- * @param payer The address of the payer cancelling the thawing
71
- * @param authorizedSigner The address of the authorized signer
72
- * @param thawEndTimestamp The timestamp at which the thawing period ends
73
- */
74
- event SignerThawCanceled (address indexed payer , address indexed authorizedSigner , uint256 thawEndTimestamp );
75
-
76
- /**
77
- * @dev Emitted when a authorized signer has been revoked
78
- * @param payer The address of the payer revoking the signer
79
- * @param authorizedSigner The address of the authorized signer
80
- */
81
- event SignerRevoked (address indexed payer , address indexed authorizedSigner );
82
-
83
42
/**
84
43
* @notice Emitted when a RAV is collected
85
44
* @param collectionId The ID of the collection "bucket" the RAV belongs to.
@@ -102,70 +61,11 @@ interface IGraphTallyCollector is IPaymentsCollector {
102
61
bytes signature
103
62
);
104
63
105
- /**
106
- * Thrown when the signer is already authorized
107
- * @param authorizingPayer The address of the payer authorizing the signer
108
- * @param signer The address of the signer
109
- */
110
- error GraphTallyCollectorSignerAlreadyAuthorized (address authorizingPayer , address signer );
111
-
112
- /**
113
- * Thrown when the signer proof deadline is invalid
114
- * @param proofDeadline The deadline for the proof provided by the signer
115
- * @param currentTimestamp The current timestamp
116
- */
117
- error GraphTallyCollectorInvalidSignerProofDeadline (uint256 proofDeadline , uint256 currentTimestamp );
118
-
119
- /**
120
- * Thrown when the signer proof is invalid
121
- */
122
- error GraphTallyCollectorInvalidSignerProof ();
123
-
124
- /**
125
- * Thrown when the signer is not authorized by the payer
126
- * @param payer The address of the payer
127
- * @param signer The address of the signer
128
- */
129
- error GraphTallyCollectorSignerNotAuthorizedByPayer (address payer , address signer );
130
-
131
- /**
132
- * Thrown when the attempting to revoke a signer that was already revoked
133
- * @param signer The address of the signer
134
- */
135
- error GraphTallyCollectorAuthorizationAlreadyRevoked (address payer , address signer );
136
-
137
- /**
138
- * Thrown when attempting to thaw a signer that is already thawing
139
- * @param signer The address of the signer
140
- * @param thawEndTimestamp The timestamp at which the thawing period ends
141
- */
142
- error GraphTallyCollectorSignerAlreadyThawing (address signer , uint256 thawEndTimestamp );
143
-
144
- /**
145
- * Thrown when the signer is not thawing
146
- * @param signer The address of the signer
147
- */
148
- error GraphTallyCollectorSignerNotThawing (address signer );
149
-
150
- /**
151
- * Thrown when the signer is still thawing
152
- * @param currentTimestamp The current timestamp
153
- * @param thawEndTimestamp The timestamp at which the thawing period ends
154
- */
155
- error GraphTallyCollectorSignerStillThawing (uint256 currentTimestamp , uint256 thawEndTimestamp );
156
-
157
64
/**
158
65
* Thrown when the RAV signer is invalid
159
66
*/
160
67
error GraphTallyCollectorInvalidRAVSigner ();
161
68
162
- /**
163
- * Thrown when the RAV payer does not match the signers authorized payer
164
- * @param authorizedPayer The address of the authorized payer
165
- * @param ravPayer The address of the RAV payer
166
- */
167
- error GraphTallyCollectorInvalidRAVPayer (address authorizedPayer , address ravPayer );
168
-
169
69
/**
170
70
* Thrown when the RAV is for a data service the service provider has no provision for
171
71
* @param dataService The address of the data service
@@ -194,55 +94,6 @@ interface IGraphTallyCollector is IPaymentsCollector {
194
94
*/
195
95
error GraphTallyCollectorInvalidTokensToCollectAmount (uint256 tokensToCollect , uint256 maxTokensToCollect );
196
96
197
- /**
198
- * @notice Authorize a signer to sign on behalf of the payer.
199
- * A signer can not be authorized for multiple payers even after revoking previous authorizations.
200
- * @dev Requirements:
201
- * - `signer` must not be already authorized
202
- * - `proofDeadline` must be greater than the current timestamp
203
- * - `proof` must be a valid signature from the signer being authorized
204
- *
205
- * Emits an {SignerAuthorized} event
206
- * @param signer The addres of the authorized signer
207
- * @param proofDeadline The deadline for the proof provided by the signer
208
- * @param proof The proof provided by the signer to be authorized by the payer, consists of (chainID, proof deadline, sender address)
209
- */
210
- function authorizeSigner (address signer , uint256 proofDeadline , bytes calldata proof ) external ;
211
-
212
- /**
213
- * @notice Starts thawing a signer to be removed from the authorized signers list
214
- * @dev Thawing a signer alerts receivers that signatures from that signer will soon be deemed invalid.
215
- * Receivers without existing signed receipts or RAVs from this signer should treat them as unauthorized.
216
- * Those with existing signed documents from this signer should work towards settling their engagements.
217
- * Once a signer is thawed, they should be viewed as revoked regardless of their revocation status.
218
- * Requirements:
219
- * - `signer` must be authorized by the payer calling this function
220
- *
221
- * Emits a {SignerThawing} event
222
- * @param signer The address of the signer to thaw
223
- */
224
- function thawSigner (address signer ) external ;
225
-
226
- /**
227
- * @notice Stops thawing a signer.
228
- * @dev Requirements:
229
- * - `signer` must be thawing and authorized by the payer calling this function
230
- *
231
- * Emits a {SignerThawCanceled} event
232
- * @param signer The address of the signer to cancel thawing
233
- */
234
- function cancelThawSigner (address signer ) external ;
235
-
236
- /**
237
- * @notice Revokes a signer from the authorized signers list if thawed.
238
- * @dev Requirements:
239
- * - `signer` must be thawed and authorized by the payer calling this function
240
- *
241
- * Emits a {SignerRevoked} event
242
- * @param signer The address of the signer
243
- */
244
- function revokeAuthorizedSigner (address signer ) external ;
245
-
246
97
/**
247
98
* @notice See {IPaymentsCollector.collect}
248
99
* This variant adds the ability to partially collect a RAV by specifying the amount of tokens to collect.
0 commit comments