@gitmyabi/rewardscontroller 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +107 -2
- package/contracts/InitializableAdminUpgradeabilityProxy.d.ts +424 -0
- package/contracts/InitializableAdminUpgradeabilityProxy.js +397 -0
- package/contracts/InitializableAdminUpgradeabilityProxy.ts +566 -0
- package/contracts/RewardsController.d.ts +1459 -0
- package/contracts/RewardsController.js +1516 -0
- package/contracts/RewardsController.ts +1894 -0
- package/contracts/index.d.ts +4 -0
- package/contracts/index.js +10 -0
- package/contracts/index.ts +5 -0
- package/index.d.ts +1 -0
- package/index.js +19 -0
- package/package.json +40 -3
|
@@ -0,0 +1,1459 @@
|
|
|
1
|
+
import type { Address, PublicClient, WalletClient } from 'viem';
|
|
2
|
+
/**
|
|
3
|
+
* RewardsDataTypes.RewardsConfigInput struct type
|
|
4
|
+
*/
|
|
5
|
+
export type RewardsDataTypes_RewardsConfigInput = {
|
|
6
|
+
emissionPerSecond: bigint;
|
|
7
|
+
totalSupply: bigint;
|
|
8
|
+
distributionEnd: bigint;
|
|
9
|
+
asset: `0x${string}`;
|
|
10
|
+
reward: `0x${string}`;
|
|
11
|
+
transferStrategy: `0x${string}`;
|
|
12
|
+
rewardOracle: `0x${string}`;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* RewardsController ABI
|
|
16
|
+
*
|
|
17
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
18
|
+
*/
|
|
19
|
+
export declare const RewardsControllerAbi: readonly [{
|
|
20
|
+
readonly inputs: readonly [{
|
|
21
|
+
readonly internalType: "address";
|
|
22
|
+
readonly name: "emissionManager";
|
|
23
|
+
readonly type: "address";
|
|
24
|
+
}];
|
|
25
|
+
readonly stateMutability: "nonpayable";
|
|
26
|
+
readonly type: "constructor";
|
|
27
|
+
}, {
|
|
28
|
+
readonly anonymous: false;
|
|
29
|
+
readonly inputs: readonly [{
|
|
30
|
+
readonly indexed: true;
|
|
31
|
+
readonly internalType: "address";
|
|
32
|
+
readonly name: "asset";
|
|
33
|
+
readonly type: "address";
|
|
34
|
+
}, {
|
|
35
|
+
readonly indexed: true;
|
|
36
|
+
readonly internalType: "address";
|
|
37
|
+
readonly name: "reward";
|
|
38
|
+
readonly type: "address";
|
|
39
|
+
}, {
|
|
40
|
+
readonly indexed: true;
|
|
41
|
+
readonly internalType: "address";
|
|
42
|
+
readonly name: "user";
|
|
43
|
+
readonly type: "address";
|
|
44
|
+
}, {
|
|
45
|
+
readonly indexed: false;
|
|
46
|
+
readonly internalType: "uint256";
|
|
47
|
+
readonly name: "assetIndex";
|
|
48
|
+
readonly type: "uint256";
|
|
49
|
+
}, {
|
|
50
|
+
readonly indexed: false;
|
|
51
|
+
readonly internalType: "uint256";
|
|
52
|
+
readonly name: "userIndex";
|
|
53
|
+
readonly type: "uint256";
|
|
54
|
+
}, {
|
|
55
|
+
readonly indexed: false;
|
|
56
|
+
readonly internalType: "uint256";
|
|
57
|
+
readonly name: "rewardsAccrued";
|
|
58
|
+
readonly type: "uint256";
|
|
59
|
+
}];
|
|
60
|
+
readonly name: "Accrued";
|
|
61
|
+
readonly type: "event";
|
|
62
|
+
}, {
|
|
63
|
+
readonly anonymous: false;
|
|
64
|
+
readonly inputs: readonly [{
|
|
65
|
+
readonly indexed: true;
|
|
66
|
+
readonly internalType: "address";
|
|
67
|
+
readonly name: "asset";
|
|
68
|
+
readonly type: "address";
|
|
69
|
+
}, {
|
|
70
|
+
readonly indexed: true;
|
|
71
|
+
readonly internalType: "address";
|
|
72
|
+
readonly name: "reward";
|
|
73
|
+
readonly type: "address";
|
|
74
|
+
}, {
|
|
75
|
+
readonly indexed: false;
|
|
76
|
+
readonly internalType: "uint256";
|
|
77
|
+
readonly name: "oldEmission";
|
|
78
|
+
readonly type: "uint256";
|
|
79
|
+
}, {
|
|
80
|
+
readonly indexed: false;
|
|
81
|
+
readonly internalType: "uint256";
|
|
82
|
+
readonly name: "newEmission";
|
|
83
|
+
readonly type: "uint256";
|
|
84
|
+
}, {
|
|
85
|
+
readonly indexed: false;
|
|
86
|
+
readonly internalType: "uint256";
|
|
87
|
+
readonly name: "oldDistributionEnd";
|
|
88
|
+
readonly type: "uint256";
|
|
89
|
+
}, {
|
|
90
|
+
readonly indexed: false;
|
|
91
|
+
readonly internalType: "uint256";
|
|
92
|
+
readonly name: "newDistributionEnd";
|
|
93
|
+
readonly type: "uint256";
|
|
94
|
+
}, {
|
|
95
|
+
readonly indexed: false;
|
|
96
|
+
readonly internalType: "uint256";
|
|
97
|
+
readonly name: "assetIndex";
|
|
98
|
+
readonly type: "uint256";
|
|
99
|
+
}];
|
|
100
|
+
readonly name: "AssetConfigUpdated";
|
|
101
|
+
readonly type: "event";
|
|
102
|
+
}, {
|
|
103
|
+
readonly anonymous: false;
|
|
104
|
+
readonly inputs: readonly [{
|
|
105
|
+
readonly indexed: true;
|
|
106
|
+
readonly internalType: "address";
|
|
107
|
+
readonly name: "user";
|
|
108
|
+
readonly type: "address";
|
|
109
|
+
}, {
|
|
110
|
+
readonly indexed: true;
|
|
111
|
+
readonly internalType: "address";
|
|
112
|
+
readonly name: "claimer";
|
|
113
|
+
readonly type: "address";
|
|
114
|
+
}];
|
|
115
|
+
readonly name: "ClaimerSet";
|
|
116
|
+
readonly type: "event";
|
|
117
|
+
}, {
|
|
118
|
+
readonly anonymous: false;
|
|
119
|
+
readonly inputs: readonly [{
|
|
120
|
+
readonly indexed: true;
|
|
121
|
+
readonly internalType: "address";
|
|
122
|
+
readonly name: "reward";
|
|
123
|
+
readonly type: "address";
|
|
124
|
+
}, {
|
|
125
|
+
readonly indexed: true;
|
|
126
|
+
readonly internalType: "address";
|
|
127
|
+
readonly name: "rewardOracle";
|
|
128
|
+
readonly type: "address";
|
|
129
|
+
}];
|
|
130
|
+
readonly name: "RewardOracleUpdated";
|
|
131
|
+
readonly type: "event";
|
|
132
|
+
}, {
|
|
133
|
+
readonly anonymous: false;
|
|
134
|
+
readonly inputs: readonly [{
|
|
135
|
+
readonly indexed: true;
|
|
136
|
+
readonly internalType: "address";
|
|
137
|
+
readonly name: "user";
|
|
138
|
+
readonly type: "address";
|
|
139
|
+
}, {
|
|
140
|
+
readonly indexed: true;
|
|
141
|
+
readonly internalType: "address";
|
|
142
|
+
readonly name: "reward";
|
|
143
|
+
readonly type: "address";
|
|
144
|
+
}, {
|
|
145
|
+
readonly indexed: true;
|
|
146
|
+
readonly internalType: "address";
|
|
147
|
+
readonly name: "to";
|
|
148
|
+
readonly type: "address";
|
|
149
|
+
}, {
|
|
150
|
+
readonly indexed: false;
|
|
151
|
+
readonly internalType: "address";
|
|
152
|
+
readonly name: "claimer";
|
|
153
|
+
readonly type: "address";
|
|
154
|
+
}, {
|
|
155
|
+
readonly indexed: false;
|
|
156
|
+
readonly internalType: "uint256";
|
|
157
|
+
readonly name: "amount";
|
|
158
|
+
readonly type: "uint256";
|
|
159
|
+
}];
|
|
160
|
+
readonly name: "RewardsClaimed";
|
|
161
|
+
readonly type: "event";
|
|
162
|
+
}, {
|
|
163
|
+
readonly anonymous: false;
|
|
164
|
+
readonly inputs: readonly [{
|
|
165
|
+
readonly indexed: true;
|
|
166
|
+
readonly internalType: "address";
|
|
167
|
+
readonly name: "reward";
|
|
168
|
+
readonly type: "address";
|
|
169
|
+
}, {
|
|
170
|
+
readonly indexed: true;
|
|
171
|
+
readonly internalType: "address";
|
|
172
|
+
readonly name: "transferStrategy";
|
|
173
|
+
readonly type: "address";
|
|
174
|
+
}];
|
|
175
|
+
readonly name: "TransferStrategyInstalled";
|
|
176
|
+
readonly type: "event";
|
|
177
|
+
}, {
|
|
178
|
+
readonly inputs: readonly [];
|
|
179
|
+
readonly name: "EMISSION_MANAGER";
|
|
180
|
+
readonly outputs: readonly [{
|
|
181
|
+
readonly internalType: "address";
|
|
182
|
+
readonly name: "";
|
|
183
|
+
readonly type: "address";
|
|
184
|
+
}];
|
|
185
|
+
readonly stateMutability: "view";
|
|
186
|
+
readonly type: "function";
|
|
187
|
+
}, {
|
|
188
|
+
readonly inputs: readonly [];
|
|
189
|
+
readonly name: "REVISION";
|
|
190
|
+
readonly outputs: readonly [{
|
|
191
|
+
readonly internalType: "uint256";
|
|
192
|
+
readonly name: "";
|
|
193
|
+
readonly type: "uint256";
|
|
194
|
+
}];
|
|
195
|
+
readonly stateMutability: "view";
|
|
196
|
+
readonly type: "function";
|
|
197
|
+
}, {
|
|
198
|
+
readonly inputs: readonly [{
|
|
199
|
+
readonly internalType: "address[]";
|
|
200
|
+
readonly name: "assets";
|
|
201
|
+
readonly type: "address[]";
|
|
202
|
+
}, {
|
|
203
|
+
readonly internalType: "address";
|
|
204
|
+
readonly name: "to";
|
|
205
|
+
readonly type: "address";
|
|
206
|
+
}];
|
|
207
|
+
readonly name: "claimAllRewards";
|
|
208
|
+
readonly outputs: readonly [{
|
|
209
|
+
readonly internalType: "address[]";
|
|
210
|
+
readonly name: "rewardsList";
|
|
211
|
+
readonly type: "address[]";
|
|
212
|
+
}, {
|
|
213
|
+
readonly internalType: "uint256[]";
|
|
214
|
+
readonly name: "claimedAmounts";
|
|
215
|
+
readonly type: "uint256[]";
|
|
216
|
+
}];
|
|
217
|
+
readonly stateMutability: "nonpayable";
|
|
218
|
+
readonly type: "function";
|
|
219
|
+
}, {
|
|
220
|
+
readonly inputs: readonly [{
|
|
221
|
+
readonly internalType: "address[]";
|
|
222
|
+
readonly name: "assets";
|
|
223
|
+
readonly type: "address[]";
|
|
224
|
+
}, {
|
|
225
|
+
readonly internalType: "address";
|
|
226
|
+
readonly name: "user";
|
|
227
|
+
readonly type: "address";
|
|
228
|
+
}, {
|
|
229
|
+
readonly internalType: "address";
|
|
230
|
+
readonly name: "to";
|
|
231
|
+
readonly type: "address";
|
|
232
|
+
}];
|
|
233
|
+
readonly name: "claimAllRewardsOnBehalf";
|
|
234
|
+
readonly outputs: readonly [{
|
|
235
|
+
readonly internalType: "address[]";
|
|
236
|
+
readonly name: "rewardsList";
|
|
237
|
+
readonly type: "address[]";
|
|
238
|
+
}, {
|
|
239
|
+
readonly internalType: "uint256[]";
|
|
240
|
+
readonly name: "claimedAmounts";
|
|
241
|
+
readonly type: "uint256[]";
|
|
242
|
+
}];
|
|
243
|
+
readonly stateMutability: "nonpayable";
|
|
244
|
+
readonly type: "function";
|
|
245
|
+
}, {
|
|
246
|
+
readonly inputs: readonly [{
|
|
247
|
+
readonly internalType: "address[]";
|
|
248
|
+
readonly name: "assets";
|
|
249
|
+
readonly type: "address[]";
|
|
250
|
+
}];
|
|
251
|
+
readonly name: "claimAllRewardsToSelf";
|
|
252
|
+
readonly outputs: readonly [{
|
|
253
|
+
readonly internalType: "address[]";
|
|
254
|
+
readonly name: "rewardsList";
|
|
255
|
+
readonly type: "address[]";
|
|
256
|
+
}, {
|
|
257
|
+
readonly internalType: "uint256[]";
|
|
258
|
+
readonly name: "claimedAmounts";
|
|
259
|
+
readonly type: "uint256[]";
|
|
260
|
+
}];
|
|
261
|
+
readonly stateMutability: "nonpayable";
|
|
262
|
+
readonly type: "function";
|
|
263
|
+
}, {
|
|
264
|
+
readonly inputs: readonly [{
|
|
265
|
+
readonly internalType: "address[]";
|
|
266
|
+
readonly name: "assets";
|
|
267
|
+
readonly type: "address[]";
|
|
268
|
+
}, {
|
|
269
|
+
readonly internalType: "uint256";
|
|
270
|
+
readonly name: "amount";
|
|
271
|
+
readonly type: "uint256";
|
|
272
|
+
}, {
|
|
273
|
+
readonly internalType: "address";
|
|
274
|
+
readonly name: "to";
|
|
275
|
+
readonly type: "address";
|
|
276
|
+
}, {
|
|
277
|
+
readonly internalType: "address";
|
|
278
|
+
readonly name: "reward";
|
|
279
|
+
readonly type: "address";
|
|
280
|
+
}];
|
|
281
|
+
readonly name: "claimRewards";
|
|
282
|
+
readonly outputs: readonly [{
|
|
283
|
+
readonly internalType: "uint256";
|
|
284
|
+
readonly name: "";
|
|
285
|
+
readonly type: "uint256";
|
|
286
|
+
}];
|
|
287
|
+
readonly stateMutability: "nonpayable";
|
|
288
|
+
readonly type: "function";
|
|
289
|
+
}, {
|
|
290
|
+
readonly inputs: readonly [{
|
|
291
|
+
readonly internalType: "address[]";
|
|
292
|
+
readonly name: "assets";
|
|
293
|
+
readonly type: "address[]";
|
|
294
|
+
}, {
|
|
295
|
+
readonly internalType: "uint256";
|
|
296
|
+
readonly name: "amount";
|
|
297
|
+
readonly type: "uint256";
|
|
298
|
+
}, {
|
|
299
|
+
readonly internalType: "address";
|
|
300
|
+
readonly name: "user";
|
|
301
|
+
readonly type: "address";
|
|
302
|
+
}, {
|
|
303
|
+
readonly internalType: "address";
|
|
304
|
+
readonly name: "to";
|
|
305
|
+
readonly type: "address";
|
|
306
|
+
}, {
|
|
307
|
+
readonly internalType: "address";
|
|
308
|
+
readonly name: "reward";
|
|
309
|
+
readonly type: "address";
|
|
310
|
+
}];
|
|
311
|
+
readonly name: "claimRewardsOnBehalf";
|
|
312
|
+
readonly outputs: readonly [{
|
|
313
|
+
readonly internalType: "uint256";
|
|
314
|
+
readonly name: "";
|
|
315
|
+
readonly type: "uint256";
|
|
316
|
+
}];
|
|
317
|
+
readonly stateMutability: "nonpayable";
|
|
318
|
+
readonly type: "function";
|
|
319
|
+
}, {
|
|
320
|
+
readonly inputs: readonly [{
|
|
321
|
+
readonly internalType: "address[]";
|
|
322
|
+
readonly name: "assets";
|
|
323
|
+
readonly type: "address[]";
|
|
324
|
+
}, {
|
|
325
|
+
readonly internalType: "uint256";
|
|
326
|
+
readonly name: "amount";
|
|
327
|
+
readonly type: "uint256";
|
|
328
|
+
}, {
|
|
329
|
+
readonly internalType: "address";
|
|
330
|
+
readonly name: "reward";
|
|
331
|
+
readonly type: "address";
|
|
332
|
+
}];
|
|
333
|
+
readonly name: "claimRewardsToSelf";
|
|
334
|
+
readonly outputs: readonly [{
|
|
335
|
+
readonly internalType: "uint256";
|
|
336
|
+
readonly name: "";
|
|
337
|
+
readonly type: "uint256";
|
|
338
|
+
}];
|
|
339
|
+
readonly stateMutability: "nonpayable";
|
|
340
|
+
readonly type: "function";
|
|
341
|
+
}, {
|
|
342
|
+
readonly inputs: readonly [{
|
|
343
|
+
readonly components: readonly [{
|
|
344
|
+
readonly internalType: "uint88";
|
|
345
|
+
readonly name: "emissionPerSecond";
|
|
346
|
+
readonly type: "uint88";
|
|
347
|
+
}, {
|
|
348
|
+
readonly internalType: "uint256";
|
|
349
|
+
readonly name: "totalSupply";
|
|
350
|
+
readonly type: "uint256";
|
|
351
|
+
}, {
|
|
352
|
+
readonly internalType: "uint32";
|
|
353
|
+
readonly name: "distributionEnd";
|
|
354
|
+
readonly type: "uint32";
|
|
355
|
+
}, {
|
|
356
|
+
readonly internalType: "address";
|
|
357
|
+
readonly name: "asset";
|
|
358
|
+
readonly type: "address";
|
|
359
|
+
}, {
|
|
360
|
+
readonly internalType: "address";
|
|
361
|
+
readonly name: "reward";
|
|
362
|
+
readonly type: "address";
|
|
363
|
+
}, {
|
|
364
|
+
readonly internalType: "contract ITransferStrategyBase";
|
|
365
|
+
readonly name: "transferStrategy";
|
|
366
|
+
readonly type: "address";
|
|
367
|
+
}, {
|
|
368
|
+
readonly internalType: "contract IEACAggregatorProxy";
|
|
369
|
+
readonly name: "rewardOracle";
|
|
370
|
+
readonly type: "address";
|
|
371
|
+
}];
|
|
372
|
+
readonly internalType: "struct RewardsDataTypes.RewardsConfigInput[]";
|
|
373
|
+
readonly name: "config";
|
|
374
|
+
readonly type: "tuple[]";
|
|
375
|
+
}];
|
|
376
|
+
readonly name: "configureAssets";
|
|
377
|
+
readonly outputs: readonly [];
|
|
378
|
+
readonly stateMutability: "nonpayable";
|
|
379
|
+
readonly type: "function";
|
|
380
|
+
}, {
|
|
381
|
+
readonly inputs: readonly [{
|
|
382
|
+
readonly internalType: "address[]";
|
|
383
|
+
readonly name: "assets";
|
|
384
|
+
readonly type: "address[]";
|
|
385
|
+
}, {
|
|
386
|
+
readonly internalType: "address";
|
|
387
|
+
readonly name: "user";
|
|
388
|
+
readonly type: "address";
|
|
389
|
+
}];
|
|
390
|
+
readonly name: "getAllUserRewards";
|
|
391
|
+
readonly outputs: readonly [{
|
|
392
|
+
readonly internalType: "address[]";
|
|
393
|
+
readonly name: "rewardsList";
|
|
394
|
+
readonly type: "address[]";
|
|
395
|
+
}, {
|
|
396
|
+
readonly internalType: "uint256[]";
|
|
397
|
+
readonly name: "unclaimedAmounts";
|
|
398
|
+
readonly type: "uint256[]";
|
|
399
|
+
}];
|
|
400
|
+
readonly stateMutability: "view";
|
|
401
|
+
readonly type: "function";
|
|
402
|
+
}, {
|
|
403
|
+
readonly inputs: readonly [{
|
|
404
|
+
readonly internalType: "address";
|
|
405
|
+
readonly name: "asset";
|
|
406
|
+
readonly type: "address";
|
|
407
|
+
}];
|
|
408
|
+
readonly name: "getAssetDecimals";
|
|
409
|
+
readonly outputs: readonly [{
|
|
410
|
+
readonly internalType: "uint8";
|
|
411
|
+
readonly name: "";
|
|
412
|
+
readonly type: "uint8";
|
|
413
|
+
}];
|
|
414
|
+
readonly stateMutability: "view";
|
|
415
|
+
readonly type: "function";
|
|
416
|
+
}, {
|
|
417
|
+
readonly inputs: readonly [{
|
|
418
|
+
readonly internalType: "address";
|
|
419
|
+
readonly name: "asset";
|
|
420
|
+
readonly type: "address";
|
|
421
|
+
}, {
|
|
422
|
+
readonly internalType: "address";
|
|
423
|
+
readonly name: "reward";
|
|
424
|
+
readonly type: "address";
|
|
425
|
+
}];
|
|
426
|
+
readonly name: "getAssetIndex";
|
|
427
|
+
readonly outputs: readonly [{
|
|
428
|
+
readonly internalType: "uint256";
|
|
429
|
+
readonly name: "";
|
|
430
|
+
readonly type: "uint256";
|
|
431
|
+
}, {
|
|
432
|
+
readonly internalType: "uint256";
|
|
433
|
+
readonly name: "";
|
|
434
|
+
readonly type: "uint256";
|
|
435
|
+
}];
|
|
436
|
+
readonly stateMutability: "view";
|
|
437
|
+
readonly type: "function";
|
|
438
|
+
}, {
|
|
439
|
+
readonly inputs: readonly [{
|
|
440
|
+
readonly internalType: "address";
|
|
441
|
+
readonly name: "user";
|
|
442
|
+
readonly type: "address";
|
|
443
|
+
}];
|
|
444
|
+
readonly name: "getClaimer";
|
|
445
|
+
readonly outputs: readonly [{
|
|
446
|
+
readonly internalType: "address";
|
|
447
|
+
readonly name: "";
|
|
448
|
+
readonly type: "address";
|
|
449
|
+
}];
|
|
450
|
+
readonly stateMutability: "view";
|
|
451
|
+
readonly type: "function";
|
|
452
|
+
}, {
|
|
453
|
+
readonly inputs: readonly [{
|
|
454
|
+
readonly internalType: "address";
|
|
455
|
+
readonly name: "asset";
|
|
456
|
+
readonly type: "address";
|
|
457
|
+
}, {
|
|
458
|
+
readonly internalType: "address";
|
|
459
|
+
readonly name: "reward";
|
|
460
|
+
readonly type: "address";
|
|
461
|
+
}];
|
|
462
|
+
readonly name: "getDistributionEnd";
|
|
463
|
+
readonly outputs: readonly [{
|
|
464
|
+
readonly internalType: "uint256";
|
|
465
|
+
readonly name: "";
|
|
466
|
+
readonly type: "uint256";
|
|
467
|
+
}];
|
|
468
|
+
readonly stateMutability: "view";
|
|
469
|
+
readonly type: "function";
|
|
470
|
+
}, {
|
|
471
|
+
readonly inputs: readonly [];
|
|
472
|
+
readonly name: "getEmissionManager";
|
|
473
|
+
readonly outputs: readonly [{
|
|
474
|
+
readonly internalType: "address";
|
|
475
|
+
readonly name: "";
|
|
476
|
+
readonly type: "address";
|
|
477
|
+
}];
|
|
478
|
+
readonly stateMutability: "view";
|
|
479
|
+
readonly type: "function";
|
|
480
|
+
}, {
|
|
481
|
+
readonly inputs: readonly [{
|
|
482
|
+
readonly internalType: "address";
|
|
483
|
+
readonly name: "reward";
|
|
484
|
+
readonly type: "address";
|
|
485
|
+
}];
|
|
486
|
+
readonly name: "getRewardOracle";
|
|
487
|
+
readonly outputs: readonly [{
|
|
488
|
+
readonly internalType: "address";
|
|
489
|
+
readonly name: "";
|
|
490
|
+
readonly type: "address";
|
|
491
|
+
}];
|
|
492
|
+
readonly stateMutability: "view";
|
|
493
|
+
readonly type: "function";
|
|
494
|
+
}, {
|
|
495
|
+
readonly inputs: readonly [{
|
|
496
|
+
readonly internalType: "address";
|
|
497
|
+
readonly name: "asset";
|
|
498
|
+
readonly type: "address";
|
|
499
|
+
}];
|
|
500
|
+
readonly name: "getRewardsByAsset";
|
|
501
|
+
readonly outputs: readonly [{
|
|
502
|
+
readonly internalType: "address[]";
|
|
503
|
+
readonly name: "";
|
|
504
|
+
readonly type: "address[]";
|
|
505
|
+
}];
|
|
506
|
+
readonly stateMutability: "view";
|
|
507
|
+
readonly type: "function";
|
|
508
|
+
}, {
|
|
509
|
+
readonly inputs: readonly [{
|
|
510
|
+
readonly internalType: "address";
|
|
511
|
+
readonly name: "asset";
|
|
512
|
+
readonly type: "address";
|
|
513
|
+
}, {
|
|
514
|
+
readonly internalType: "address";
|
|
515
|
+
readonly name: "reward";
|
|
516
|
+
readonly type: "address";
|
|
517
|
+
}];
|
|
518
|
+
readonly name: "getRewardsData";
|
|
519
|
+
readonly outputs: readonly [{
|
|
520
|
+
readonly internalType: "uint256";
|
|
521
|
+
readonly name: "";
|
|
522
|
+
readonly type: "uint256";
|
|
523
|
+
}, {
|
|
524
|
+
readonly internalType: "uint256";
|
|
525
|
+
readonly name: "";
|
|
526
|
+
readonly type: "uint256";
|
|
527
|
+
}, {
|
|
528
|
+
readonly internalType: "uint256";
|
|
529
|
+
readonly name: "";
|
|
530
|
+
readonly type: "uint256";
|
|
531
|
+
}, {
|
|
532
|
+
readonly internalType: "uint256";
|
|
533
|
+
readonly name: "";
|
|
534
|
+
readonly type: "uint256";
|
|
535
|
+
}];
|
|
536
|
+
readonly stateMutability: "view";
|
|
537
|
+
readonly type: "function";
|
|
538
|
+
}, {
|
|
539
|
+
readonly inputs: readonly [];
|
|
540
|
+
readonly name: "getRewardsList";
|
|
541
|
+
readonly outputs: readonly [{
|
|
542
|
+
readonly internalType: "address[]";
|
|
543
|
+
readonly name: "";
|
|
544
|
+
readonly type: "address[]";
|
|
545
|
+
}];
|
|
546
|
+
readonly stateMutability: "view";
|
|
547
|
+
readonly type: "function";
|
|
548
|
+
}, {
|
|
549
|
+
readonly inputs: readonly [{
|
|
550
|
+
readonly internalType: "address";
|
|
551
|
+
readonly name: "reward";
|
|
552
|
+
readonly type: "address";
|
|
553
|
+
}];
|
|
554
|
+
readonly name: "getTransferStrategy";
|
|
555
|
+
readonly outputs: readonly [{
|
|
556
|
+
readonly internalType: "address";
|
|
557
|
+
readonly name: "";
|
|
558
|
+
readonly type: "address";
|
|
559
|
+
}];
|
|
560
|
+
readonly stateMutability: "view";
|
|
561
|
+
readonly type: "function";
|
|
562
|
+
}, {
|
|
563
|
+
readonly inputs: readonly [{
|
|
564
|
+
readonly internalType: "address";
|
|
565
|
+
readonly name: "user";
|
|
566
|
+
readonly type: "address";
|
|
567
|
+
}, {
|
|
568
|
+
readonly internalType: "address";
|
|
569
|
+
readonly name: "reward";
|
|
570
|
+
readonly type: "address";
|
|
571
|
+
}];
|
|
572
|
+
readonly name: "getUserAccruedRewards";
|
|
573
|
+
readonly outputs: readonly [{
|
|
574
|
+
readonly internalType: "uint256";
|
|
575
|
+
readonly name: "";
|
|
576
|
+
readonly type: "uint256";
|
|
577
|
+
}];
|
|
578
|
+
readonly stateMutability: "view";
|
|
579
|
+
readonly type: "function";
|
|
580
|
+
}, {
|
|
581
|
+
readonly inputs: readonly [{
|
|
582
|
+
readonly internalType: "address";
|
|
583
|
+
readonly name: "user";
|
|
584
|
+
readonly type: "address";
|
|
585
|
+
}, {
|
|
586
|
+
readonly internalType: "address";
|
|
587
|
+
readonly name: "asset";
|
|
588
|
+
readonly type: "address";
|
|
589
|
+
}, {
|
|
590
|
+
readonly internalType: "address";
|
|
591
|
+
readonly name: "reward";
|
|
592
|
+
readonly type: "address";
|
|
593
|
+
}];
|
|
594
|
+
readonly name: "getUserAssetIndex";
|
|
595
|
+
readonly outputs: readonly [{
|
|
596
|
+
readonly internalType: "uint256";
|
|
597
|
+
readonly name: "";
|
|
598
|
+
readonly type: "uint256";
|
|
599
|
+
}];
|
|
600
|
+
readonly stateMutability: "view";
|
|
601
|
+
readonly type: "function";
|
|
602
|
+
}, {
|
|
603
|
+
readonly inputs: readonly [{
|
|
604
|
+
readonly internalType: "address[]";
|
|
605
|
+
readonly name: "assets";
|
|
606
|
+
readonly type: "address[]";
|
|
607
|
+
}, {
|
|
608
|
+
readonly internalType: "address";
|
|
609
|
+
readonly name: "user";
|
|
610
|
+
readonly type: "address";
|
|
611
|
+
}, {
|
|
612
|
+
readonly internalType: "address";
|
|
613
|
+
readonly name: "reward";
|
|
614
|
+
readonly type: "address";
|
|
615
|
+
}];
|
|
616
|
+
readonly name: "getUserRewards";
|
|
617
|
+
readonly outputs: readonly [{
|
|
618
|
+
readonly internalType: "uint256";
|
|
619
|
+
readonly name: "";
|
|
620
|
+
readonly type: "uint256";
|
|
621
|
+
}];
|
|
622
|
+
readonly stateMutability: "view";
|
|
623
|
+
readonly type: "function";
|
|
624
|
+
}, {
|
|
625
|
+
readonly inputs: readonly [{
|
|
626
|
+
readonly internalType: "address";
|
|
627
|
+
readonly name: "user";
|
|
628
|
+
readonly type: "address";
|
|
629
|
+
}, {
|
|
630
|
+
readonly internalType: "uint256";
|
|
631
|
+
readonly name: "totalSupply";
|
|
632
|
+
readonly type: "uint256";
|
|
633
|
+
}, {
|
|
634
|
+
readonly internalType: "uint256";
|
|
635
|
+
readonly name: "userBalance";
|
|
636
|
+
readonly type: "uint256";
|
|
637
|
+
}];
|
|
638
|
+
readonly name: "handleAction";
|
|
639
|
+
readonly outputs: readonly [];
|
|
640
|
+
readonly stateMutability: "nonpayable";
|
|
641
|
+
readonly type: "function";
|
|
642
|
+
}, {
|
|
643
|
+
readonly inputs: readonly [{
|
|
644
|
+
readonly internalType: "address";
|
|
645
|
+
readonly name: "";
|
|
646
|
+
readonly type: "address";
|
|
647
|
+
}];
|
|
648
|
+
readonly name: "initialize";
|
|
649
|
+
readonly outputs: readonly [];
|
|
650
|
+
readonly stateMutability: "nonpayable";
|
|
651
|
+
readonly type: "function";
|
|
652
|
+
}, {
|
|
653
|
+
readonly inputs: readonly [{
|
|
654
|
+
readonly internalType: "address";
|
|
655
|
+
readonly name: "user";
|
|
656
|
+
readonly type: "address";
|
|
657
|
+
}, {
|
|
658
|
+
readonly internalType: "address";
|
|
659
|
+
readonly name: "caller";
|
|
660
|
+
readonly type: "address";
|
|
661
|
+
}];
|
|
662
|
+
readonly name: "setClaimer";
|
|
663
|
+
readonly outputs: readonly [];
|
|
664
|
+
readonly stateMutability: "nonpayable";
|
|
665
|
+
readonly type: "function";
|
|
666
|
+
}, {
|
|
667
|
+
readonly inputs: readonly [{
|
|
668
|
+
readonly internalType: "address";
|
|
669
|
+
readonly name: "asset";
|
|
670
|
+
readonly type: "address";
|
|
671
|
+
}, {
|
|
672
|
+
readonly internalType: "address";
|
|
673
|
+
readonly name: "reward";
|
|
674
|
+
readonly type: "address";
|
|
675
|
+
}, {
|
|
676
|
+
readonly internalType: "uint32";
|
|
677
|
+
readonly name: "newDistributionEnd";
|
|
678
|
+
readonly type: "uint32";
|
|
679
|
+
}];
|
|
680
|
+
readonly name: "setDistributionEnd";
|
|
681
|
+
readonly outputs: readonly [];
|
|
682
|
+
readonly stateMutability: "nonpayable";
|
|
683
|
+
readonly type: "function";
|
|
684
|
+
}, {
|
|
685
|
+
readonly inputs: readonly [{
|
|
686
|
+
readonly internalType: "address";
|
|
687
|
+
readonly name: "asset";
|
|
688
|
+
readonly type: "address";
|
|
689
|
+
}, {
|
|
690
|
+
readonly internalType: "address[]";
|
|
691
|
+
readonly name: "rewards";
|
|
692
|
+
readonly type: "address[]";
|
|
693
|
+
}, {
|
|
694
|
+
readonly internalType: "uint88[]";
|
|
695
|
+
readonly name: "newEmissionsPerSecond";
|
|
696
|
+
readonly type: "uint88[]";
|
|
697
|
+
}];
|
|
698
|
+
readonly name: "setEmissionPerSecond";
|
|
699
|
+
readonly outputs: readonly [];
|
|
700
|
+
readonly stateMutability: "nonpayable";
|
|
701
|
+
readonly type: "function";
|
|
702
|
+
}, {
|
|
703
|
+
readonly inputs: readonly [{
|
|
704
|
+
readonly internalType: "address";
|
|
705
|
+
readonly name: "reward";
|
|
706
|
+
readonly type: "address";
|
|
707
|
+
}, {
|
|
708
|
+
readonly internalType: "contract IEACAggregatorProxy";
|
|
709
|
+
readonly name: "rewardOracle";
|
|
710
|
+
readonly type: "address";
|
|
711
|
+
}];
|
|
712
|
+
readonly name: "setRewardOracle";
|
|
713
|
+
readonly outputs: readonly [];
|
|
714
|
+
readonly stateMutability: "nonpayable";
|
|
715
|
+
readonly type: "function";
|
|
716
|
+
}, {
|
|
717
|
+
readonly inputs: readonly [{
|
|
718
|
+
readonly internalType: "address";
|
|
719
|
+
readonly name: "reward";
|
|
720
|
+
readonly type: "address";
|
|
721
|
+
}, {
|
|
722
|
+
readonly internalType: "contract ITransferStrategyBase";
|
|
723
|
+
readonly name: "transferStrategy";
|
|
724
|
+
readonly type: "address";
|
|
725
|
+
}];
|
|
726
|
+
readonly name: "setTransferStrategy";
|
|
727
|
+
readonly outputs: readonly [];
|
|
728
|
+
readonly stateMutability: "nonpayable";
|
|
729
|
+
readonly type: "function";
|
|
730
|
+
}];
|
|
731
|
+
/**
|
|
732
|
+
* Type-safe ABI for RewardsController
|
|
733
|
+
*/
|
|
734
|
+
export type RewardsControllerAbi = typeof RewardsControllerAbi;
|
|
735
|
+
/**
|
|
736
|
+
* Contract instance type for RewardsController
|
|
737
|
+
*/
|
|
738
|
+
export type RewardsControllerContract = any;
|
|
739
|
+
/**
|
|
740
|
+
* RewardsController Contract Class
|
|
741
|
+
*
|
|
742
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
743
|
+
*
|
|
744
|
+
* @example
|
|
745
|
+
* ```typescript
|
|
746
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
747
|
+
* import { mainnet } from 'viem/chains';
|
|
748
|
+
* import { RewardsController } from 'RewardsController';
|
|
749
|
+
*
|
|
750
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
751
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
752
|
+
*
|
|
753
|
+
* const contract = new RewardsController('0x...', { publicClient, walletClient });
|
|
754
|
+
*
|
|
755
|
+
* // Read functions
|
|
756
|
+
* const result = await contract.balanceOf('0x...');
|
|
757
|
+
*
|
|
758
|
+
* // Write functions
|
|
759
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
760
|
+
*
|
|
761
|
+
* // Simulate transactions (dry-run)
|
|
762
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
763
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
764
|
+
*
|
|
765
|
+
* // Watch events
|
|
766
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
767
|
+
* console.log('Transfer event:', event);
|
|
768
|
+
* });
|
|
769
|
+
* ```
|
|
770
|
+
*/
|
|
771
|
+
export declare class RewardsController {
|
|
772
|
+
private contract;
|
|
773
|
+
private contractAddress;
|
|
774
|
+
private publicClient;
|
|
775
|
+
constructor(address: Address, clients: {
|
|
776
|
+
publicClient: PublicClient;
|
|
777
|
+
walletClient?: WalletClient;
|
|
778
|
+
});
|
|
779
|
+
/**
|
|
780
|
+
* Get the contract address
|
|
781
|
+
*/
|
|
782
|
+
get address(): Address;
|
|
783
|
+
/**
|
|
784
|
+
* Get the underlying viem contract instance.
|
|
785
|
+
*/
|
|
786
|
+
getContract(): RewardsControllerContract;
|
|
787
|
+
/**
|
|
788
|
+
* EMISSION_MANAGER
|
|
789
|
+
* view
|
|
790
|
+
*/
|
|
791
|
+
EMISSION_MANAGER(): Promise<`0x${string}`>;
|
|
792
|
+
/**
|
|
793
|
+
* REVISION
|
|
794
|
+
* view
|
|
795
|
+
*/
|
|
796
|
+
REVISION(): Promise<bigint>;
|
|
797
|
+
/**
|
|
798
|
+
* getAllUserRewards
|
|
799
|
+
* view
|
|
800
|
+
*/
|
|
801
|
+
getAllUserRewards(assets: `0x${string}`[], user: `0x${string}`): Promise<[`0x${string}`[], bigint[]]>;
|
|
802
|
+
/**
|
|
803
|
+
* getAssetDecimals
|
|
804
|
+
* view
|
|
805
|
+
*/
|
|
806
|
+
getAssetDecimals(asset: `0x${string}`): Promise<bigint>;
|
|
807
|
+
/**
|
|
808
|
+
* getAssetIndex
|
|
809
|
+
* view
|
|
810
|
+
*/
|
|
811
|
+
getAssetIndex(asset: `0x${string}`, reward: `0x${string}`): Promise<[bigint, bigint]>;
|
|
812
|
+
/**
|
|
813
|
+
* getClaimer
|
|
814
|
+
* view
|
|
815
|
+
*/
|
|
816
|
+
getClaimer(user: `0x${string}`): Promise<`0x${string}`>;
|
|
817
|
+
/**
|
|
818
|
+
* getDistributionEnd
|
|
819
|
+
* view
|
|
820
|
+
*/
|
|
821
|
+
getDistributionEnd(asset: `0x${string}`, reward: `0x${string}`): Promise<bigint>;
|
|
822
|
+
/**
|
|
823
|
+
* getEmissionManager
|
|
824
|
+
* view
|
|
825
|
+
*/
|
|
826
|
+
getEmissionManager(): Promise<`0x${string}`>;
|
|
827
|
+
/**
|
|
828
|
+
* getRewardOracle
|
|
829
|
+
* view
|
|
830
|
+
*/
|
|
831
|
+
getRewardOracle(reward: `0x${string}`): Promise<`0x${string}`>;
|
|
832
|
+
/**
|
|
833
|
+
* getRewardsByAsset
|
|
834
|
+
* view
|
|
835
|
+
*/
|
|
836
|
+
getRewardsByAsset(asset: `0x${string}`): Promise<`0x${string}`[]>;
|
|
837
|
+
/**
|
|
838
|
+
* getRewardsData
|
|
839
|
+
* view
|
|
840
|
+
*/
|
|
841
|
+
getRewardsData(asset: `0x${string}`, reward: `0x${string}`): Promise<[bigint, bigint, bigint, bigint]>;
|
|
842
|
+
/**
|
|
843
|
+
* getRewardsList
|
|
844
|
+
* view
|
|
845
|
+
*/
|
|
846
|
+
getRewardsList(): Promise<`0x${string}`[]>;
|
|
847
|
+
/**
|
|
848
|
+
* getTransferStrategy
|
|
849
|
+
* view
|
|
850
|
+
*/
|
|
851
|
+
getTransferStrategy(reward: `0x${string}`): Promise<`0x${string}`>;
|
|
852
|
+
/**
|
|
853
|
+
* getUserAccruedRewards
|
|
854
|
+
* view
|
|
855
|
+
*/
|
|
856
|
+
getUserAccruedRewards(user: `0x${string}`, reward: `0x${string}`): Promise<bigint>;
|
|
857
|
+
/**
|
|
858
|
+
* getUserAssetIndex
|
|
859
|
+
* view
|
|
860
|
+
*/
|
|
861
|
+
getUserAssetIndex(user: `0x${string}`, asset: `0x${string}`, reward: `0x${string}`): Promise<bigint>;
|
|
862
|
+
/**
|
|
863
|
+
* getUserRewards
|
|
864
|
+
* view
|
|
865
|
+
*/
|
|
866
|
+
getUserRewards(assets: `0x${string}`[], user: `0x${string}`, reward: `0x${string}`): Promise<bigint>;
|
|
867
|
+
/**
|
|
868
|
+
* claimAllRewards
|
|
869
|
+
* nonpayable
|
|
870
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
871
|
+
*/
|
|
872
|
+
claimAllRewards(assets: `0x${string}`[], to: `0x${string}`, options?: {
|
|
873
|
+
accessList?: import('viem').AccessList;
|
|
874
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
875
|
+
chain?: import('viem').Chain | null;
|
|
876
|
+
dataSuffix?: `0x${string}`;
|
|
877
|
+
gas?: bigint;
|
|
878
|
+
gasPrice?: bigint;
|
|
879
|
+
maxFeePerGas?: bigint;
|
|
880
|
+
maxPriorityFeePerGas?: bigint;
|
|
881
|
+
nonce?: number;
|
|
882
|
+
value?: bigint;
|
|
883
|
+
}): Promise<`0x${string}`>;
|
|
884
|
+
/**
|
|
885
|
+
* claimAllRewardsOnBehalf
|
|
886
|
+
* nonpayable
|
|
887
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
888
|
+
*/
|
|
889
|
+
claimAllRewardsOnBehalf(assets: `0x${string}`[], user: `0x${string}`, to: `0x${string}`, options?: {
|
|
890
|
+
accessList?: import('viem').AccessList;
|
|
891
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
892
|
+
chain?: import('viem').Chain | null;
|
|
893
|
+
dataSuffix?: `0x${string}`;
|
|
894
|
+
gas?: bigint;
|
|
895
|
+
gasPrice?: bigint;
|
|
896
|
+
maxFeePerGas?: bigint;
|
|
897
|
+
maxPriorityFeePerGas?: bigint;
|
|
898
|
+
nonce?: number;
|
|
899
|
+
value?: bigint;
|
|
900
|
+
}): Promise<`0x${string}`>;
|
|
901
|
+
/**
|
|
902
|
+
* claimAllRewardsToSelf
|
|
903
|
+
* nonpayable
|
|
904
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
905
|
+
*/
|
|
906
|
+
claimAllRewardsToSelf(assets: `0x${string}`[], options?: {
|
|
907
|
+
accessList?: import('viem').AccessList;
|
|
908
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
909
|
+
chain?: import('viem').Chain | null;
|
|
910
|
+
dataSuffix?: `0x${string}`;
|
|
911
|
+
gas?: bigint;
|
|
912
|
+
gasPrice?: bigint;
|
|
913
|
+
maxFeePerGas?: bigint;
|
|
914
|
+
maxPriorityFeePerGas?: bigint;
|
|
915
|
+
nonce?: number;
|
|
916
|
+
value?: bigint;
|
|
917
|
+
}): Promise<`0x${string}`>;
|
|
918
|
+
/**
|
|
919
|
+
* claimRewards
|
|
920
|
+
* nonpayable
|
|
921
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
922
|
+
*/
|
|
923
|
+
claimRewards(assets: `0x${string}`[], amount: bigint, to: `0x${string}`, reward: `0x${string}`, options?: {
|
|
924
|
+
accessList?: import('viem').AccessList;
|
|
925
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
926
|
+
chain?: import('viem').Chain | null;
|
|
927
|
+
dataSuffix?: `0x${string}`;
|
|
928
|
+
gas?: bigint;
|
|
929
|
+
gasPrice?: bigint;
|
|
930
|
+
maxFeePerGas?: bigint;
|
|
931
|
+
maxPriorityFeePerGas?: bigint;
|
|
932
|
+
nonce?: number;
|
|
933
|
+
value?: bigint;
|
|
934
|
+
}): Promise<`0x${string}`>;
|
|
935
|
+
/**
|
|
936
|
+
* claimRewardsOnBehalf
|
|
937
|
+
* nonpayable
|
|
938
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
939
|
+
*/
|
|
940
|
+
claimRewardsOnBehalf(assets: `0x${string}`[], amount: bigint, user: `0x${string}`, to: `0x${string}`, reward: `0x${string}`, options?: {
|
|
941
|
+
accessList?: import('viem').AccessList;
|
|
942
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
943
|
+
chain?: import('viem').Chain | null;
|
|
944
|
+
dataSuffix?: `0x${string}`;
|
|
945
|
+
gas?: bigint;
|
|
946
|
+
gasPrice?: bigint;
|
|
947
|
+
maxFeePerGas?: bigint;
|
|
948
|
+
maxPriorityFeePerGas?: bigint;
|
|
949
|
+
nonce?: number;
|
|
950
|
+
value?: bigint;
|
|
951
|
+
}): Promise<`0x${string}`>;
|
|
952
|
+
/**
|
|
953
|
+
* claimRewardsToSelf
|
|
954
|
+
* nonpayable
|
|
955
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
956
|
+
*/
|
|
957
|
+
claimRewardsToSelf(assets: `0x${string}`[], amount: bigint, reward: `0x${string}`, options?: {
|
|
958
|
+
accessList?: import('viem').AccessList;
|
|
959
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
960
|
+
chain?: import('viem').Chain | null;
|
|
961
|
+
dataSuffix?: `0x${string}`;
|
|
962
|
+
gas?: bigint;
|
|
963
|
+
gasPrice?: bigint;
|
|
964
|
+
maxFeePerGas?: bigint;
|
|
965
|
+
maxPriorityFeePerGas?: bigint;
|
|
966
|
+
nonce?: number;
|
|
967
|
+
value?: bigint;
|
|
968
|
+
}): Promise<`0x${string}`>;
|
|
969
|
+
/**
|
|
970
|
+
* configureAssets
|
|
971
|
+
* nonpayable
|
|
972
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
973
|
+
*/
|
|
974
|
+
configureAssets(config: RewardsDataTypes_RewardsConfigInput[], options?: {
|
|
975
|
+
accessList?: import('viem').AccessList;
|
|
976
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
977
|
+
chain?: import('viem').Chain | null;
|
|
978
|
+
dataSuffix?: `0x${string}`;
|
|
979
|
+
gas?: bigint;
|
|
980
|
+
gasPrice?: bigint;
|
|
981
|
+
maxFeePerGas?: bigint;
|
|
982
|
+
maxPriorityFeePerGas?: bigint;
|
|
983
|
+
nonce?: number;
|
|
984
|
+
value?: bigint;
|
|
985
|
+
}): Promise<`0x${string}`>;
|
|
986
|
+
/**
|
|
987
|
+
* handleAction
|
|
988
|
+
* nonpayable
|
|
989
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
990
|
+
*/
|
|
991
|
+
handleAction(user: `0x${string}`, totalSupply: bigint, userBalance: bigint, options?: {
|
|
992
|
+
accessList?: import('viem').AccessList;
|
|
993
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
994
|
+
chain?: import('viem').Chain | null;
|
|
995
|
+
dataSuffix?: `0x${string}`;
|
|
996
|
+
gas?: bigint;
|
|
997
|
+
gasPrice?: bigint;
|
|
998
|
+
maxFeePerGas?: bigint;
|
|
999
|
+
maxPriorityFeePerGas?: bigint;
|
|
1000
|
+
nonce?: number;
|
|
1001
|
+
value?: bigint;
|
|
1002
|
+
}): Promise<`0x${string}`>;
|
|
1003
|
+
/**
|
|
1004
|
+
* initialize
|
|
1005
|
+
* nonpayable
|
|
1006
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1007
|
+
*/
|
|
1008
|
+
initialize(arg0: `0x${string}`, options?: {
|
|
1009
|
+
accessList?: import('viem').AccessList;
|
|
1010
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1011
|
+
chain?: import('viem').Chain | null;
|
|
1012
|
+
dataSuffix?: `0x${string}`;
|
|
1013
|
+
gas?: bigint;
|
|
1014
|
+
gasPrice?: bigint;
|
|
1015
|
+
maxFeePerGas?: bigint;
|
|
1016
|
+
maxPriorityFeePerGas?: bigint;
|
|
1017
|
+
nonce?: number;
|
|
1018
|
+
value?: bigint;
|
|
1019
|
+
}): Promise<`0x${string}`>;
|
|
1020
|
+
/**
|
|
1021
|
+
* setClaimer
|
|
1022
|
+
* nonpayable
|
|
1023
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1024
|
+
*/
|
|
1025
|
+
setClaimer(user: `0x${string}`, caller: `0x${string}`, options?: {
|
|
1026
|
+
accessList?: import('viem').AccessList;
|
|
1027
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1028
|
+
chain?: import('viem').Chain | null;
|
|
1029
|
+
dataSuffix?: `0x${string}`;
|
|
1030
|
+
gas?: bigint;
|
|
1031
|
+
gasPrice?: bigint;
|
|
1032
|
+
maxFeePerGas?: bigint;
|
|
1033
|
+
maxPriorityFeePerGas?: bigint;
|
|
1034
|
+
nonce?: number;
|
|
1035
|
+
value?: bigint;
|
|
1036
|
+
}): Promise<`0x${string}`>;
|
|
1037
|
+
/**
|
|
1038
|
+
* setDistributionEnd
|
|
1039
|
+
* nonpayable
|
|
1040
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1041
|
+
*/
|
|
1042
|
+
setDistributionEnd(asset: `0x${string}`, reward: `0x${string}`, newDistributionEnd: bigint, options?: {
|
|
1043
|
+
accessList?: import('viem').AccessList;
|
|
1044
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1045
|
+
chain?: import('viem').Chain | null;
|
|
1046
|
+
dataSuffix?: `0x${string}`;
|
|
1047
|
+
gas?: bigint;
|
|
1048
|
+
gasPrice?: bigint;
|
|
1049
|
+
maxFeePerGas?: bigint;
|
|
1050
|
+
maxPriorityFeePerGas?: bigint;
|
|
1051
|
+
nonce?: number;
|
|
1052
|
+
value?: bigint;
|
|
1053
|
+
}): Promise<`0x${string}`>;
|
|
1054
|
+
/**
|
|
1055
|
+
* setEmissionPerSecond
|
|
1056
|
+
* nonpayable
|
|
1057
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1058
|
+
*/
|
|
1059
|
+
setEmissionPerSecond(asset: `0x${string}`, rewards: `0x${string}`[], newEmissionsPerSecond: bigint[], options?: {
|
|
1060
|
+
accessList?: import('viem').AccessList;
|
|
1061
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1062
|
+
chain?: import('viem').Chain | null;
|
|
1063
|
+
dataSuffix?: `0x${string}`;
|
|
1064
|
+
gas?: bigint;
|
|
1065
|
+
gasPrice?: bigint;
|
|
1066
|
+
maxFeePerGas?: bigint;
|
|
1067
|
+
maxPriorityFeePerGas?: bigint;
|
|
1068
|
+
nonce?: number;
|
|
1069
|
+
value?: bigint;
|
|
1070
|
+
}): Promise<`0x${string}`>;
|
|
1071
|
+
/**
|
|
1072
|
+
* setRewardOracle
|
|
1073
|
+
* nonpayable
|
|
1074
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1075
|
+
*/
|
|
1076
|
+
setRewardOracle(reward: `0x${string}`, rewardOracle: `0x${string}`, options?: {
|
|
1077
|
+
accessList?: import('viem').AccessList;
|
|
1078
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1079
|
+
chain?: import('viem').Chain | null;
|
|
1080
|
+
dataSuffix?: `0x${string}`;
|
|
1081
|
+
gas?: bigint;
|
|
1082
|
+
gasPrice?: bigint;
|
|
1083
|
+
maxFeePerGas?: bigint;
|
|
1084
|
+
maxPriorityFeePerGas?: bigint;
|
|
1085
|
+
nonce?: number;
|
|
1086
|
+
value?: bigint;
|
|
1087
|
+
}): Promise<`0x${string}`>;
|
|
1088
|
+
/**
|
|
1089
|
+
* setTransferStrategy
|
|
1090
|
+
* nonpayable
|
|
1091
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1092
|
+
*/
|
|
1093
|
+
setTransferStrategy(reward: `0x${string}`, transferStrategy: `0x${string}`, options?: {
|
|
1094
|
+
accessList?: import('viem').AccessList;
|
|
1095
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1096
|
+
chain?: import('viem').Chain | null;
|
|
1097
|
+
dataSuffix?: `0x${string}`;
|
|
1098
|
+
gas?: bigint;
|
|
1099
|
+
gasPrice?: bigint;
|
|
1100
|
+
maxFeePerGas?: bigint;
|
|
1101
|
+
maxPriorityFeePerGas?: bigint;
|
|
1102
|
+
nonce?: number;
|
|
1103
|
+
value?: bigint;
|
|
1104
|
+
}): Promise<`0x${string}`>;
|
|
1105
|
+
/**
|
|
1106
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
1107
|
+
*
|
|
1108
|
+
* @example
|
|
1109
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
1110
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
1111
|
+
* console.log('Would succeed:', result.result);
|
|
1112
|
+
*/
|
|
1113
|
+
get simulate(): {
|
|
1114
|
+
/**
|
|
1115
|
+
* Simulate claimAllRewards
|
|
1116
|
+
* Returns gas estimate and result without sending transaction
|
|
1117
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1118
|
+
*/
|
|
1119
|
+
claimAllRewards(assets: `0x${string}`[], to: `0x${string}`, options?: {
|
|
1120
|
+
accessList?: import("viem").AccessList;
|
|
1121
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1122
|
+
chain?: import("viem").Chain | null;
|
|
1123
|
+
dataSuffix?: `0x${string}`;
|
|
1124
|
+
gas?: bigint;
|
|
1125
|
+
gasPrice?: bigint;
|
|
1126
|
+
maxFeePerGas?: bigint;
|
|
1127
|
+
maxPriorityFeePerGas?: bigint;
|
|
1128
|
+
nonce?: number;
|
|
1129
|
+
value?: bigint;
|
|
1130
|
+
}): Promise<[`0x${string}`[], bigint[]]>;
|
|
1131
|
+
/**
|
|
1132
|
+
* Simulate claimAllRewardsOnBehalf
|
|
1133
|
+
* Returns gas estimate and result without sending transaction
|
|
1134
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1135
|
+
*/
|
|
1136
|
+
claimAllRewardsOnBehalf(assets: `0x${string}`[], user: `0x${string}`, to: `0x${string}`, options?: {
|
|
1137
|
+
accessList?: import("viem").AccessList;
|
|
1138
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1139
|
+
chain?: import("viem").Chain | null;
|
|
1140
|
+
dataSuffix?: `0x${string}`;
|
|
1141
|
+
gas?: bigint;
|
|
1142
|
+
gasPrice?: bigint;
|
|
1143
|
+
maxFeePerGas?: bigint;
|
|
1144
|
+
maxPriorityFeePerGas?: bigint;
|
|
1145
|
+
nonce?: number;
|
|
1146
|
+
value?: bigint;
|
|
1147
|
+
}): Promise<[`0x${string}`[], bigint[]]>;
|
|
1148
|
+
/**
|
|
1149
|
+
* Simulate claimAllRewardsToSelf
|
|
1150
|
+
* Returns gas estimate and result without sending transaction
|
|
1151
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1152
|
+
*/
|
|
1153
|
+
claimAllRewardsToSelf(assets: `0x${string}`[], options?: {
|
|
1154
|
+
accessList?: import("viem").AccessList;
|
|
1155
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1156
|
+
chain?: import("viem").Chain | null;
|
|
1157
|
+
dataSuffix?: `0x${string}`;
|
|
1158
|
+
gas?: bigint;
|
|
1159
|
+
gasPrice?: bigint;
|
|
1160
|
+
maxFeePerGas?: bigint;
|
|
1161
|
+
maxPriorityFeePerGas?: bigint;
|
|
1162
|
+
nonce?: number;
|
|
1163
|
+
value?: bigint;
|
|
1164
|
+
}): Promise<[`0x${string}`[], bigint[]]>;
|
|
1165
|
+
/**
|
|
1166
|
+
* Simulate claimRewards
|
|
1167
|
+
* Returns gas estimate and result without sending transaction
|
|
1168
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1169
|
+
*/
|
|
1170
|
+
claimRewards(assets: `0x${string}`[], amount: bigint, to: `0x${string}`, reward: `0x${string}`, options?: {
|
|
1171
|
+
accessList?: import("viem").AccessList;
|
|
1172
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1173
|
+
chain?: import("viem").Chain | null;
|
|
1174
|
+
dataSuffix?: `0x${string}`;
|
|
1175
|
+
gas?: bigint;
|
|
1176
|
+
gasPrice?: bigint;
|
|
1177
|
+
maxFeePerGas?: bigint;
|
|
1178
|
+
maxPriorityFeePerGas?: bigint;
|
|
1179
|
+
nonce?: number;
|
|
1180
|
+
value?: bigint;
|
|
1181
|
+
}): Promise<bigint>;
|
|
1182
|
+
/**
|
|
1183
|
+
* Simulate claimRewardsOnBehalf
|
|
1184
|
+
* Returns gas estimate and result without sending transaction
|
|
1185
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1186
|
+
*/
|
|
1187
|
+
claimRewardsOnBehalf(assets: `0x${string}`[], amount: bigint, user: `0x${string}`, to: `0x${string}`, reward: `0x${string}`, options?: {
|
|
1188
|
+
accessList?: import("viem").AccessList;
|
|
1189
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1190
|
+
chain?: import("viem").Chain | null;
|
|
1191
|
+
dataSuffix?: `0x${string}`;
|
|
1192
|
+
gas?: bigint;
|
|
1193
|
+
gasPrice?: bigint;
|
|
1194
|
+
maxFeePerGas?: bigint;
|
|
1195
|
+
maxPriorityFeePerGas?: bigint;
|
|
1196
|
+
nonce?: number;
|
|
1197
|
+
value?: bigint;
|
|
1198
|
+
}): Promise<bigint>;
|
|
1199
|
+
/**
|
|
1200
|
+
* Simulate claimRewardsToSelf
|
|
1201
|
+
* Returns gas estimate and result without sending transaction
|
|
1202
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1203
|
+
*/
|
|
1204
|
+
claimRewardsToSelf(assets: `0x${string}`[], amount: bigint, reward: `0x${string}`, options?: {
|
|
1205
|
+
accessList?: import("viem").AccessList;
|
|
1206
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1207
|
+
chain?: import("viem").Chain | null;
|
|
1208
|
+
dataSuffix?: `0x${string}`;
|
|
1209
|
+
gas?: bigint;
|
|
1210
|
+
gasPrice?: bigint;
|
|
1211
|
+
maxFeePerGas?: bigint;
|
|
1212
|
+
maxPriorityFeePerGas?: bigint;
|
|
1213
|
+
nonce?: number;
|
|
1214
|
+
value?: bigint;
|
|
1215
|
+
}): Promise<bigint>;
|
|
1216
|
+
/**
|
|
1217
|
+
* Simulate configureAssets
|
|
1218
|
+
* Returns gas estimate and result without sending transaction
|
|
1219
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1220
|
+
*/
|
|
1221
|
+
configureAssets(config: RewardsDataTypes_RewardsConfigInput[], options?: {
|
|
1222
|
+
accessList?: import("viem").AccessList;
|
|
1223
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1224
|
+
chain?: import("viem").Chain | null;
|
|
1225
|
+
dataSuffix?: `0x${string}`;
|
|
1226
|
+
gas?: bigint;
|
|
1227
|
+
gasPrice?: bigint;
|
|
1228
|
+
maxFeePerGas?: bigint;
|
|
1229
|
+
maxPriorityFeePerGas?: bigint;
|
|
1230
|
+
nonce?: number;
|
|
1231
|
+
value?: bigint;
|
|
1232
|
+
}): Promise<void>;
|
|
1233
|
+
/**
|
|
1234
|
+
* Simulate handleAction
|
|
1235
|
+
* Returns gas estimate and result without sending transaction
|
|
1236
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1237
|
+
*/
|
|
1238
|
+
handleAction(user: `0x${string}`, totalSupply: bigint, userBalance: bigint, options?: {
|
|
1239
|
+
accessList?: import("viem").AccessList;
|
|
1240
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1241
|
+
chain?: import("viem").Chain | null;
|
|
1242
|
+
dataSuffix?: `0x${string}`;
|
|
1243
|
+
gas?: bigint;
|
|
1244
|
+
gasPrice?: bigint;
|
|
1245
|
+
maxFeePerGas?: bigint;
|
|
1246
|
+
maxPriorityFeePerGas?: bigint;
|
|
1247
|
+
nonce?: number;
|
|
1248
|
+
value?: bigint;
|
|
1249
|
+
}): Promise<void>;
|
|
1250
|
+
/**
|
|
1251
|
+
* Simulate initialize
|
|
1252
|
+
* Returns gas estimate and result without sending transaction
|
|
1253
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1254
|
+
*/
|
|
1255
|
+
initialize(arg0: `0x${string}`, options?: {
|
|
1256
|
+
accessList?: import("viem").AccessList;
|
|
1257
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1258
|
+
chain?: import("viem").Chain | null;
|
|
1259
|
+
dataSuffix?: `0x${string}`;
|
|
1260
|
+
gas?: bigint;
|
|
1261
|
+
gasPrice?: bigint;
|
|
1262
|
+
maxFeePerGas?: bigint;
|
|
1263
|
+
maxPriorityFeePerGas?: bigint;
|
|
1264
|
+
nonce?: number;
|
|
1265
|
+
value?: bigint;
|
|
1266
|
+
}): Promise<void>;
|
|
1267
|
+
/**
|
|
1268
|
+
* Simulate setClaimer
|
|
1269
|
+
* Returns gas estimate and result without sending transaction
|
|
1270
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1271
|
+
*/
|
|
1272
|
+
setClaimer(user: `0x${string}`, caller: `0x${string}`, options?: {
|
|
1273
|
+
accessList?: import("viem").AccessList;
|
|
1274
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1275
|
+
chain?: import("viem").Chain | null;
|
|
1276
|
+
dataSuffix?: `0x${string}`;
|
|
1277
|
+
gas?: bigint;
|
|
1278
|
+
gasPrice?: bigint;
|
|
1279
|
+
maxFeePerGas?: bigint;
|
|
1280
|
+
maxPriorityFeePerGas?: bigint;
|
|
1281
|
+
nonce?: number;
|
|
1282
|
+
value?: bigint;
|
|
1283
|
+
}): Promise<void>;
|
|
1284
|
+
/**
|
|
1285
|
+
* Simulate setDistributionEnd
|
|
1286
|
+
* Returns gas estimate and result without sending transaction
|
|
1287
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1288
|
+
*/
|
|
1289
|
+
setDistributionEnd(asset: `0x${string}`, reward: `0x${string}`, newDistributionEnd: bigint, options?: {
|
|
1290
|
+
accessList?: import("viem").AccessList;
|
|
1291
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1292
|
+
chain?: import("viem").Chain | null;
|
|
1293
|
+
dataSuffix?: `0x${string}`;
|
|
1294
|
+
gas?: bigint;
|
|
1295
|
+
gasPrice?: bigint;
|
|
1296
|
+
maxFeePerGas?: bigint;
|
|
1297
|
+
maxPriorityFeePerGas?: bigint;
|
|
1298
|
+
nonce?: number;
|
|
1299
|
+
value?: bigint;
|
|
1300
|
+
}): Promise<void>;
|
|
1301
|
+
/**
|
|
1302
|
+
* Simulate setEmissionPerSecond
|
|
1303
|
+
* Returns gas estimate and result without sending transaction
|
|
1304
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1305
|
+
*/
|
|
1306
|
+
setEmissionPerSecond(asset: `0x${string}`, rewards: `0x${string}`[], newEmissionsPerSecond: bigint[], options?: {
|
|
1307
|
+
accessList?: import("viem").AccessList;
|
|
1308
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1309
|
+
chain?: import("viem").Chain | null;
|
|
1310
|
+
dataSuffix?: `0x${string}`;
|
|
1311
|
+
gas?: bigint;
|
|
1312
|
+
gasPrice?: bigint;
|
|
1313
|
+
maxFeePerGas?: bigint;
|
|
1314
|
+
maxPriorityFeePerGas?: bigint;
|
|
1315
|
+
nonce?: number;
|
|
1316
|
+
value?: bigint;
|
|
1317
|
+
}): Promise<void>;
|
|
1318
|
+
/**
|
|
1319
|
+
* Simulate setRewardOracle
|
|
1320
|
+
* Returns gas estimate and result without sending transaction
|
|
1321
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1322
|
+
*/
|
|
1323
|
+
setRewardOracle(reward: `0x${string}`, rewardOracle: `0x${string}`, options?: {
|
|
1324
|
+
accessList?: import("viem").AccessList;
|
|
1325
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1326
|
+
chain?: import("viem").Chain | null;
|
|
1327
|
+
dataSuffix?: `0x${string}`;
|
|
1328
|
+
gas?: bigint;
|
|
1329
|
+
gasPrice?: bigint;
|
|
1330
|
+
maxFeePerGas?: bigint;
|
|
1331
|
+
maxPriorityFeePerGas?: bigint;
|
|
1332
|
+
nonce?: number;
|
|
1333
|
+
value?: bigint;
|
|
1334
|
+
}): Promise<void>;
|
|
1335
|
+
/**
|
|
1336
|
+
* Simulate setTransferStrategy
|
|
1337
|
+
* Returns gas estimate and result without sending transaction
|
|
1338
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1339
|
+
*/
|
|
1340
|
+
setTransferStrategy(reward: `0x${string}`, transferStrategy: `0x${string}`, options?: {
|
|
1341
|
+
accessList?: import("viem").AccessList;
|
|
1342
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1343
|
+
chain?: import("viem").Chain | null;
|
|
1344
|
+
dataSuffix?: `0x${string}`;
|
|
1345
|
+
gas?: bigint;
|
|
1346
|
+
gasPrice?: bigint;
|
|
1347
|
+
maxFeePerGas?: bigint;
|
|
1348
|
+
maxPriorityFeePerGas?: bigint;
|
|
1349
|
+
nonce?: number;
|
|
1350
|
+
value?: bigint;
|
|
1351
|
+
}): Promise<void>;
|
|
1352
|
+
};
|
|
1353
|
+
/**
|
|
1354
|
+
* Watch contract events
|
|
1355
|
+
*
|
|
1356
|
+
* @example
|
|
1357
|
+
* // Watch all Transfer events
|
|
1358
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
1359
|
+
* console.log('Transfer:', event);
|
|
1360
|
+
* });
|
|
1361
|
+
*
|
|
1362
|
+
* // Stop watching
|
|
1363
|
+
* unwatch();
|
|
1364
|
+
*/
|
|
1365
|
+
get watch(): {
|
|
1366
|
+
/**
|
|
1367
|
+
* Watch Accrued events
|
|
1368
|
+
* @param callback Function to call when event is emitted
|
|
1369
|
+
* @param filter Optional filter for indexed parameters
|
|
1370
|
+
* @returns Unwatch function to stop listening
|
|
1371
|
+
*/
|
|
1372
|
+
Accrued: (callback: (event: {
|
|
1373
|
+
asset: `0x${string}`;
|
|
1374
|
+
reward: `0x${string}`;
|
|
1375
|
+
user: `0x${string}`;
|
|
1376
|
+
assetIndex: bigint;
|
|
1377
|
+
userIndex: bigint;
|
|
1378
|
+
rewardsAccrued: bigint;
|
|
1379
|
+
}) => void, filter?: {
|
|
1380
|
+
asset?: `0x${string}` | `0x${string}`[] | null;
|
|
1381
|
+
reward?: `0x${string}` | `0x${string}`[] | null;
|
|
1382
|
+
user?: `0x${string}` | `0x${string}`[] | null;
|
|
1383
|
+
}) => () => void;
|
|
1384
|
+
/**
|
|
1385
|
+
* Watch AssetConfigUpdated events
|
|
1386
|
+
* @param callback Function to call when event is emitted
|
|
1387
|
+
* @param filter Optional filter for indexed parameters
|
|
1388
|
+
* @returns Unwatch function to stop listening
|
|
1389
|
+
*/
|
|
1390
|
+
AssetConfigUpdated: (callback: (event: {
|
|
1391
|
+
asset: `0x${string}`;
|
|
1392
|
+
reward: `0x${string}`;
|
|
1393
|
+
oldEmission: bigint;
|
|
1394
|
+
newEmission: bigint;
|
|
1395
|
+
oldDistributionEnd: bigint;
|
|
1396
|
+
newDistributionEnd: bigint;
|
|
1397
|
+
assetIndex: bigint;
|
|
1398
|
+
}) => void, filter?: {
|
|
1399
|
+
asset?: `0x${string}` | `0x${string}`[] | null;
|
|
1400
|
+
reward?: `0x${string}` | `0x${string}`[] | null;
|
|
1401
|
+
}) => () => void;
|
|
1402
|
+
/**
|
|
1403
|
+
* Watch ClaimerSet events
|
|
1404
|
+
* @param callback Function to call when event is emitted
|
|
1405
|
+
* @param filter Optional filter for indexed parameters
|
|
1406
|
+
* @returns Unwatch function to stop listening
|
|
1407
|
+
*/
|
|
1408
|
+
ClaimerSet: (callback: (event: {
|
|
1409
|
+
user: `0x${string}`;
|
|
1410
|
+
claimer: `0x${string}`;
|
|
1411
|
+
}) => void, filter?: {
|
|
1412
|
+
user?: `0x${string}` | `0x${string}`[] | null;
|
|
1413
|
+
claimer?: `0x${string}` | `0x${string}`[] | null;
|
|
1414
|
+
}) => () => void;
|
|
1415
|
+
/**
|
|
1416
|
+
* Watch RewardOracleUpdated events
|
|
1417
|
+
* @param callback Function to call when event is emitted
|
|
1418
|
+
* @param filter Optional filter for indexed parameters
|
|
1419
|
+
* @returns Unwatch function to stop listening
|
|
1420
|
+
*/
|
|
1421
|
+
RewardOracleUpdated: (callback: (event: {
|
|
1422
|
+
reward: `0x${string}`;
|
|
1423
|
+
rewardOracle: `0x${string}`;
|
|
1424
|
+
}) => void, filter?: {
|
|
1425
|
+
reward?: `0x${string}` | `0x${string}`[] | null;
|
|
1426
|
+
rewardOracle?: `0x${string}` | `0x${string}`[] | null;
|
|
1427
|
+
}) => () => void;
|
|
1428
|
+
/**
|
|
1429
|
+
* Watch RewardsClaimed events
|
|
1430
|
+
* @param callback Function to call when event is emitted
|
|
1431
|
+
* @param filter Optional filter for indexed parameters
|
|
1432
|
+
* @returns Unwatch function to stop listening
|
|
1433
|
+
*/
|
|
1434
|
+
RewardsClaimed: (callback: (event: {
|
|
1435
|
+
user: `0x${string}`;
|
|
1436
|
+
reward: `0x${string}`;
|
|
1437
|
+
to: `0x${string}`;
|
|
1438
|
+
claimer: `0x${string}`;
|
|
1439
|
+
amount: bigint;
|
|
1440
|
+
}) => void, filter?: {
|
|
1441
|
+
user?: `0x${string}` | `0x${string}`[] | null;
|
|
1442
|
+
reward?: `0x${string}` | `0x${string}`[] | null;
|
|
1443
|
+
to?: `0x${string}` | `0x${string}`[] | null;
|
|
1444
|
+
}) => () => void;
|
|
1445
|
+
/**
|
|
1446
|
+
* Watch TransferStrategyInstalled events
|
|
1447
|
+
* @param callback Function to call when event is emitted
|
|
1448
|
+
* @param filter Optional filter for indexed parameters
|
|
1449
|
+
* @returns Unwatch function to stop listening
|
|
1450
|
+
*/
|
|
1451
|
+
TransferStrategyInstalled: (callback: (event: {
|
|
1452
|
+
reward: `0x${string}`;
|
|
1453
|
+
transferStrategy: `0x${string}`;
|
|
1454
|
+
}) => void, filter?: {
|
|
1455
|
+
reward?: `0x${string}` | `0x${string}`[] | null;
|
|
1456
|
+
transferStrategy?: `0x${string}` | `0x${string}`[] | null;
|
|
1457
|
+
}) => () => void;
|
|
1458
|
+
};
|
|
1459
|
+
}
|