@gitmyabi/clgauge 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/CLGauge.d.ts +1766 -0
- package/contracts/CLGauge.js +1912 -0
- package/contracts/CLGauge.ts +2312 -0
- package/contracts/index.d.ts +2 -0
- package/contracts/index.js +7 -0
- package/contracts/index.ts +3 -0
- package/index.d.ts +1 -0
- package/index.js +19 -0
- package/package.json +40 -3
|
@@ -0,0 +1,2312 @@
|
|
|
1
|
+
import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
|
|
2
|
+
import { getContract } from 'viem';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* CLGauge ABI
|
|
6
|
+
*
|
|
7
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
8
|
+
*/
|
|
9
|
+
export const CLGaugeAbi = [
|
|
10
|
+
{
|
|
11
|
+
"inputs": [
|
|
12
|
+
{
|
|
13
|
+
"internalType": "address",
|
|
14
|
+
"name": "_voter",
|
|
15
|
+
"type": "address"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"internalType": "address",
|
|
19
|
+
"name": "_nft",
|
|
20
|
+
"type": "address"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"internalType": "address",
|
|
24
|
+
"name": "_gaugeFactory",
|
|
25
|
+
"type": "address"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"stateMutability": "nonpayable",
|
|
29
|
+
"type": "constructor"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"anonymous": false,
|
|
33
|
+
"inputs": [
|
|
34
|
+
{
|
|
35
|
+
"indexed": true,
|
|
36
|
+
"internalType": "address",
|
|
37
|
+
"name": "_owner",
|
|
38
|
+
"type": "address"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"indexed": true,
|
|
42
|
+
"internalType": "address",
|
|
43
|
+
"name": "_operator",
|
|
44
|
+
"type": "address"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"indexed": true,
|
|
48
|
+
"internalType": "uint256",
|
|
49
|
+
"name": "_tokenId",
|
|
50
|
+
"type": "uint256"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"name": "Approval",
|
|
54
|
+
"type": "event"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"anonymous": false,
|
|
58
|
+
"inputs": [
|
|
59
|
+
{
|
|
60
|
+
"indexed": true,
|
|
61
|
+
"internalType": "address",
|
|
62
|
+
"name": "_owner",
|
|
63
|
+
"type": "address"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"indexed": true,
|
|
67
|
+
"internalType": "address",
|
|
68
|
+
"name": "_operator",
|
|
69
|
+
"type": "address"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"indexed": false,
|
|
73
|
+
"internalType": "bool",
|
|
74
|
+
"name": "_approved",
|
|
75
|
+
"type": "bool"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"name": "ApprovalForAll",
|
|
79
|
+
"type": "event"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"anonymous": false,
|
|
83
|
+
"inputs": [
|
|
84
|
+
{
|
|
85
|
+
"indexed": true,
|
|
86
|
+
"internalType": "address",
|
|
87
|
+
"name": "_account",
|
|
88
|
+
"type": "address"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"indexed": true,
|
|
92
|
+
"internalType": "address",
|
|
93
|
+
"name": "_operator",
|
|
94
|
+
"type": "address"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"indexed": false,
|
|
98
|
+
"internalType": "bool",
|
|
99
|
+
"name": "_approved",
|
|
100
|
+
"type": "bool"
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"name": "ClaimApproval",
|
|
104
|
+
"type": "event"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"anonymous": false,
|
|
108
|
+
"inputs": [
|
|
109
|
+
{
|
|
110
|
+
"indexed": true,
|
|
111
|
+
"internalType": "address",
|
|
112
|
+
"name": "_caller",
|
|
113
|
+
"type": "address"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"indexed": false,
|
|
117
|
+
"internalType": "uint256",
|
|
118
|
+
"name": "_claimed0",
|
|
119
|
+
"type": "uint256"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"indexed": false,
|
|
123
|
+
"internalType": "uint256",
|
|
124
|
+
"name": "_claimed1",
|
|
125
|
+
"type": "uint256"
|
|
126
|
+
}
|
|
127
|
+
],
|
|
128
|
+
"name": "ClaimFees",
|
|
129
|
+
"type": "event"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"anonymous": false,
|
|
133
|
+
"inputs": [
|
|
134
|
+
{
|
|
135
|
+
"indexed": true,
|
|
136
|
+
"internalType": "address",
|
|
137
|
+
"name": "_account",
|
|
138
|
+
"type": "address"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"indexed": true,
|
|
142
|
+
"internalType": "address",
|
|
143
|
+
"name": "_recipient",
|
|
144
|
+
"type": "address"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"indexed": false,
|
|
148
|
+
"internalType": "uint256",
|
|
149
|
+
"name": "_amount",
|
|
150
|
+
"type": "uint256"
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
"name": "DeferredEmissionsClaimed",
|
|
154
|
+
"type": "event"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"anonymous": false,
|
|
158
|
+
"inputs": [
|
|
159
|
+
{
|
|
160
|
+
"indexed": true,
|
|
161
|
+
"internalType": "address",
|
|
162
|
+
"name": "_caller",
|
|
163
|
+
"type": "address"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"indexed": true,
|
|
167
|
+
"internalType": "address",
|
|
168
|
+
"name": "_user",
|
|
169
|
+
"type": "address"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"indexed": true,
|
|
173
|
+
"internalType": "uint256",
|
|
174
|
+
"name": "_tokenId",
|
|
175
|
+
"type": "uint256"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"indexed": false,
|
|
179
|
+
"internalType": "uint128",
|
|
180
|
+
"name": "_liquidityToStake",
|
|
181
|
+
"type": "uint128"
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
"name": "Deposit",
|
|
185
|
+
"type": "event"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"anonymous": false,
|
|
189
|
+
"inputs": [
|
|
190
|
+
{
|
|
191
|
+
"indexed": true,
|
|
192
|
+
"internalType": "address",
|
|
193
|
+
"name": "_from",
|
|
194
|
+
"type": "address"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"indexed": true,
|
|
198
|
+
"internalType": "uint256",
|
|
199
|
+
"name": "_tokenId",
|
|
200
|
+
"type": "uint256"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"indexed": false,
|
|
204
|
+
"internalType": "uint256",
|
|
205
|
+
"name": "_penalty",
|
|
206
|
+
"type": "uint256"
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"name": "EarlyWithdrawPenalty",
|
|
210
|
+
"type": "event"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"anonymous": false,
|
|
214
|
+
"inputs": [
|
|
215
|
+
{
|
|
216
|
+
"indexed": true,
|
|
217
|
+
"internalType": "address",
|
|
218
|
+
"name": "_user",
|
|
219
|
+
"type": "address"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"indexed": true,
|
|
223
|
+
"internalType": "uint256",
|
|
224
|
+
"name": "_tokenId",
|
|
225
|
+
"type": "uint256"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"indexed": false,
|
|
229
|
+
"internalType": "uint128",
|
|
230
|
+
"name": "_liquidityToStake",
|
|
231
|
+
"type": "uint128"
|
|
232
|
+
}
|
|
233
|
+
],
|
|
234
|
+
"name": "EmergencyWithdraw",
|
|
235
|
+
"type": "event"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"anonymous": false,
|
|
239
|
+
"inputs": [
|
|
240
|
+
{
|
|
241
|
+
"indexed": true,
|
|
242
|
+
"internalType": "address",
|
|
243
|
+
"name": "_account",
|
|
244
|
+
"type": "address"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"indexed": true,
|
|
248
|
+
"internalType": "uint256",
|
|
249
|
+
"name": "_tokenId",
|
|
250
|
+
"type": "uint256"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"indexed": true,
|
|
254
|
+
"internalType": "address",
|
|
255
|
+
"name": "_recipient",
|
|
256
|
+
"type": "address"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"indexed": false,
|
|
260
|
+
"internalType": "uint256",
|
|
261
|
+
"name": "_rewardAmount",
|
|
262
|
+
"type": "uint256"
|
|
263
|
+
}
|
|
264
|
+
],
|
|
265
|
+
"name": "EmissionsClaimed",
|
|
266
|
+
"type": "event"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"anonymous": false,
|
|
270
|
+
"inputs": [
|
|
271
|
+
{
|
|
272
|
+
"indexed": true,
|
|
273
|
+
"internalType": "address",
|
|
274
|
+
"name": "_account",
|
|
275
|
+
"type": "address"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"indexed": true,
|
|
279
|
+
"internalType": "uint256",
|
|
280
|
+
"name": "_tokenId",
|
|
281
|
+
"type": "uint256"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"indexed": false,
|
|
285
|
+
"internalType": "uint256",
|
|
286
|
+
"name": "_rewardAmount",
|
|
287
|
+
"type": "uint256"
|
|
288
|
+
}
|
|
289
|
+
],
|
|
290
|
+
"name": "EmissionsDeferred",
|
|
291
|
+
"type": "event"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"anonymous": false,
|
|
295
|
+
"inputs": [
|
|
296
|
+
{
|
|
297
|
+
"indexed": false,
|
|
298
|
+
"internalType": "uint256",
|
|
299
|
+
"name": "_cumulativeRewardShare",
|
|
300
|
+
"type": "uint256"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"indexed": false,
|
|
304
|
+
"internalType": "uint256",
|
|
305
|
+
"name": "_delta",
|
|
306
|
+
"type": "uint256"
|
|
307
|
+
}
|
|
308
|
+
],
|
|
309
|
+
"name": "GaugeSettled",
|
|
310
|
+
"type": "event"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"anonymous": false,
|
|
314
|
+
"inputs": [
|
|
315
|
+
{
|
|
316
|
+
"indexed": true,
|
|
317
|
+
"internalType": "address",
|
|
318
|
+
"name": "_referral",
|
|
319
|
+
"type": "address"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"indexed": true,
|
|
323
|
+
"internalType": "address",
|
|
324
|
+
"name": "_recipient",
|
|
325
|
+
"type": "address"
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"indexed": false,
|
|
329
|
+
"internalType": "uint256",
|
|
330
|
+
"name": "_amount",
|
|
331
|
+
"type": "uint256"
|
|
332
|
+
}
|
|
333
|
+
],
|
|
334
|
+
"name": "ReferralEmissionsClaimed",
|
|
335
|
+
"type": "event"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"anonymous": false,
|
|
339
|
+
"inputs": [
|
|
340
|
+
{
|
|
341
|
+
"indexed": true,
|
|
342
|
+
"internalType": "address",
|
|
343
|
+
"name": "_account",
|
|
344
|
+
"type": "address"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"indexed": true,
|
|
348
|
+
"internalType": "uint256",
|
|
349
|
+
"name": "_tokenId",
|
|
350
|
+
"type": "uint256"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"indexed": true,
|
|
354
|
+
"internalType": "address",
|
|
355
|
+
"name": "_referral",
|
|
356
|
+
"type": "address"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"indexed": false,
|
|
360
|
+
"internalType": "uint256",
|
|
361
|
+
"name": "_amount",
|
|
362
|
+
"type": "uint256"
|
|
363
|
+
}
|
|
364
|
+
],
|
|
365
|
+
"name": "ReferralEmissionsDeferred",
|
|
366
|
+
"type": "event"
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"anonymous": false,
|
|
370
|
+
"inputs": [
|
|
371
|
+
{
|
|
372
|
+
"indexed": true,
|
|
373
|
+
"internalType": "address",
|
|
374
|
+
"name": "_caller",
|
|
375
|
+
"type": "address"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"indexed": true,
|
|
379
|
+
"internalType": "address",
|
|
380
|
+
"name": "_user",
|
|
381
|
+
"type": "address"
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
"indexed": true,
|
|
385
|
+
"internalType": "uint256",
|
|
386
|
+
"name": "_tokenId",
|
|
387
|
+
"type": "uint256"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"indexed": false,
|
|
391
|
+
"internalType": "uint128",
|
|
392
|
+
"name": "_liquidityToStake",
|
|
393
|
+
"type": "uint128"
|
|
394
|
+
}
|
|
395
|
+
],
|
|
396
|
+
"name": "Withdraw",
|
|
397
|
+
"type": "event"
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"inputs": [
|
|
401
|
+
{
|
|
402
|
+
"internalType": "address",
|
|
403
|
+
"name": "operator",
|
|
404
|
+
"type": "address"
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"internalType": "uint256",
|
|
408
|
+
"name": "tokenId",
|
|
409
|
+
"type": "uint256"
|
|
410
|
+
}
|
|
411
|
+
],
|
|
412
|
+
"name": "approve",
|
|
413
|
+
"outputs": [],
|
|
414
|
+
"stateMutability": "nonpayable",
|
|
415
|
+
"type": "function"
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"inputs": [
|
|
419
|
+
{
|
|
420
|
+
"internalType": "address",
|
|
421
|
+
"name": "_operator",
|
|
422
|
+
"type": "address"
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
"internalType": "bool",
|
|
426
|
+
"name": "_approved",
|
|
427
|
+
"type": "bool"
|
|
428
|
+
}
|
|
429
|
+
],
|
|
430
|
+
"name": "approveForClaim",
|
|
431
|
+
"outputs": [],
|
|
432
|
+
"stateMutability": "nonpayable",
|
|
433
|
+
"type": "function"
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"inputs": [
|
|
437
|
+
{
|
|
438
|
+
"internalType": "address",
|
|
439
|
+
"name": "",
|
|
440
|
+
"type": "address"
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"internalType": "address",
|
|
444
|
+
"name": "",
|
|
445
|
+
"type": "address"
|
|
446
|
+
}
|
|
447
|
+
],
|
|
448
|
+
"name": "approvedForClaim",
|
|
449
|
+
"outputs": [
|
|
450
|
+
{
|
|
451
|
+
"internalType": "bool",
|
|
452
|
+
"name": "",
|
|
453
|
+
"type": "bool"
|
|
454
|
+
}
|
|
455
|
+
],
|
|
456
|
+
"stateMutability": "view",
|
|
457
|
+
"type": "function"
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
"inputs": [
|
|
461
|
+
{
|
|
462
|
+
"internalType": "address",
|
|
463
|
+
"name": "_account",
|
|
464
|
+
"type": "address"
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"internalType": "address",
|
|
468
|
+
"name": "_recipient",
|
|
469
|
+
"type": "address"
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"internalType": "uint256[]",
|
|
473
|
+
"name": "_tokenIds",
|
|
474
|
+
"type": "uint256[]"
|
|
475
|
+
}
|
|
476
|
+
],
|
|
477
|
+
"name": "claimEmissions",
|
|
478
|
+
"outputs": [],
|
|
479
|
+
"stateMutability": "nonpayable",
|
|
480
|
+
"type": "function"
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"inputs": [
|
|
484
|
+
{
|
|
485
|
+
"internalType": "address",
|
|
486
|
+
"name": "_account",
|
|
487
|
+
"type": "address"
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"internalType": "address",
|
|
491
|
+
"name": "_recipient",
|
|
492
|
+
"type": "address"
|
|
493
|
+
}
|
|
494
|
+
],
|
|
495
|
+
"name": "claimEmissions",
|
|
496
|
+
"outputs": [],
|
|
497
|
+
"stateMutability": "nonpayable",
|
|
498
|
+
"type": "function"
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
"inputs": [
|
|
502
|
+
{
|
|
503
|
+
"internalType": "address",
|
|
504
|
+
"name": "_referral",
|
|
505
|
+
"type": "address"
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
"internalType": "address",
|
|
509
|
+
"name": "_recipient",
|
|
510
|
+
"type": "address"
|
|
511
|
+
}
|
|
512
|
+
],
|
|
513
|
+
"name": "claimReferralEmissions",
|
|
514
|
+
"outputs": [],
|
|
515
|
+
"stateMutability": "nonpayable",
|
|
516
|
+
"type": "function"
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
"inputs": [],
|
|
520
|
+
"name": "collectFees",
|
|
521
|
+
"outputs": [
|
|
522
|
+
{
|
|
523
|
+
"internalType": "uint256",
|
|
524
|
+
"name": "",
|
|
525
|
+
"type": "uint256"
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
"internalType": "uint256",
|
|
529
|
+
"name": "",
|
|
530
|
+
"type": "uint256"
|
|
531
|
+
}
|
|
532
|
+
],
|
|
533
|
+
"stateMutability": "nonpayable",
|
|
534
|
+
"type": "function"
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"inputs": [
|
|
538
|
+
{
|
|
539
|
+
"internalType": "address",
|
|
540
|
+
"name": "",
|
|
541
|
+
"type": "address"
|
|
542
|
+
}
|
|
543
|
+
],
|
|
544
|
+
"name": "deferredEmissions",
|
|
545
|
+
"outputs": [
|
|
546
|
+
{
|
|
547
|
+
"internalType": "uint256",
|
|
548
|
+
"name": "",
|
|
549
|
+
"type": "uint256"
|
|
550
|
+
}
|
|
551
|
+
],
|
|
552
|
+
"stateMutability": "view",
|
|
553
|
+
"type": "function"
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
"inputs": [
|
|
557
|
+
{
|
|
558
|
+
"internalType": "address",
|
|
559
|
+
"name": "",
|
|
560
|
+
"type": "address"
|
|
561
|
+
}
|
|
562
|
+
],
|
|
563
|
+
"name": "deferredReferralEmissions",
|
|
564
|
+
"outputs": [
|
|
565
|
+
{
|
|
566
|
+
"internalType": "uint256",
|
|
567
|
+
"name": "",
|
|
568
|
+
"type": "uint256"
|
|
569
|
+
}
|
|
570
|
+
],
|
|
571
|
+
"stateMutability": "view",
|
|
572
|
+
"type": "function"
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
"inputs": [
|
|
576
|
+
{
|
|
577
|
+
"internalType": "uint256",
|
|
578
|
+
"name": "_lp",
|
|
579
|
+
"type": "uint256"
|
|
580
|
+
}
|
|
581
|
+
],
|
|
582
|
+
"name": "deposit",
|
|
583
|
+
"outputs": [],
|
|
584
|
+
"stateMutability": "nonpayable",
|
|
585
|
+
"type": "function"
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
"inputs": [
|
|
589
|
+
{
|
|
590
|
+
"internalType": "uint256",
|
|
591
|
+
"name": "",
|
|
592
|
+
"type": "uint256"
|
|
593
|
+
}
|
|
594
|
+
],
|
|
595
|
+
"name": "depositBlock",
|
|
596
|
+
"outputs": [
|
|
597
|
+
{
|
|
598
|
+
"internalType": "uint256",
|
|
599
|
+
"name": "",
|
|
600
|
+
"type": "uint256"
|
|
601
|
+
}
|
|
602
|
+
],
|
|
603
|
+
"stateMutability": "view",
|
|
604
|
+
"type": "function"
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
"inputs": [
|
|
608
|
+
{
|
|
609
|
+
"internalType": "uint256",
|
|
610
|
+
"name": "_lp",
|
|
611
|
+
"type": "uint256"
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
"internalType": "address",
|
|
615
|
+
"name": "_owner",
|
|
616
|
+
"type": "address"
|
|
617
|
+
}
|
|
618
|
+
],
|
|
619
|
+
"name": "depositFor",
|
|
620
|
+
"outputs": [],
|
|
621
|
+
"stateMutability": "nonpayable",
|
|
622
|
+
"type": "function"
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
"inputs": [
|
|
626
|
+
{
|
|
627
|
+
"internalType": "address",
|
|
628
|
+
"name": "_account",
|
|
629
|
+
"type": "address"
|
|
630
|
+
}
|
|
631
|
+
],
|
|
632
|
+
"name": "earned",
|
|
633
|
+
"outputs": [
|
|
634
|
+
{
|
|
635
|
+
"internalType": "uint256",
|
|
636
|
+
"name": "",
|
|
637
|
+
"type": "uint256"
|
|
638
|
+
}
|
|
639
|
+
],
|
|
640
|
+
"stateMutability": "view",
|
|
641
|
+
"type": "function"
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
"inputs": [
|
|
645
|
+
{
|
|
646
|
+
"internalType": "address",
|
|
647
|
+
"name": "_account",
|
|
648
|
+
"type": "address"
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
"internalType": "uint256[]",
|
|
652
|
+
"name": "_tokenIds",
|
|
653
|
+
"type": "uint256[]"
|
|
654
|
+
}
|
|
655
|
+
],
|
|
656
|
+
"name": "earned",
|
|
657
|
+
"outputs": [
|
|
658
|
+
{
|
|
659
|
+
"internalType": "uint256",
|
|
660
|
+
"name": "",
|
|
661
|
+
"type": "uint256"
|
|
662
|
+
}
|
|
663
|
+
],
|
|
664
|
+
"stateMutability": "view",
|
|
665
|
+
"type": "function"
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
"inputs": [
|
|
669
|
+
{
|
|
670
|
+
"internalType": "uint256",
|
|
671
|
+
"name": "tokenId",
|
|
672
|
+
"type": "uint256"
|
|
673
|
+
}
|
|
674
|
+
],
|
|
675
|
+
"name": "emergencyWithdraw",
|
|
676
|
+
"outputs": [],
|
|
677
|
+
"stateMutability": "nonpayable",
|
|
678
|
+
"type": "function"
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
"inputs": [],
|
|
682
|
+
"name": "forfeitRollover",
|
|
683
|
+
"outputs": [],
|
|
684
|
+
"stateMutability": "nonpayable",
|
|
685
|
+
"type": "function"
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
"inputs": [],
|
|
689
|
+
"name": "gaugeFactory",
|
|
690
|
+
"outputs": [
|
|
691
|
+
{
|
|
692
|
+
"internalType": "address",
|
|
693
|
+
"name": "",
|
|
694
|
+
"type": "address"
|
|
695
|
+
}
|
|
696
|
+
],
|
|
697
|
+
"stateMutability": "view",
|
|
698
|
+
"type": "function"
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
"inputs": [
|
|
702
|
+
{
|
|
703
|
+
"internalType": "uint256",
|
|
704
|
+
"name": "tokenId",
|
|
705
|
+
"type": "uint256"
|
|
706
|
+
}
|
|
707
|
+
],
|
|
708
|
+
"name": "getApproved",
|
|
709
|
+
"outputs": [
|
|
710
|
+
{
|
|
711
|
+
"internalType": "address",
|
|
712
|
+
"name": "",
|
|
713
|
+
"type": "address"
|
|
714
|
+
}
|
|
715
|
+
],
|
|
716
|
+
"stateMutability": "view",
|
|
717
|
+
"type": "function"
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
"inputs": [
|
|
721
|
+
{
|
|
722
|
+
"internalType": "address",
|
|
723
|
+
"name": "_pool",
|
|
724
|
+
"type": "address"
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
"internalType": "address",
|
|
728
|
+
"name": "_votingRewardsManager",
|
|
729
|
+
"type": "address"
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
"internalType": "address",
|
|
733
|
+
"name": "_token0",
|
|
734
|
+
"type": "address"
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
"internalType": "address",
|
|
738
|
+
"name": "_token1",
|
|
739
|
+
"type": "address"
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
"internalType": "int24",
|
|
743
|
+
"name": "_tickSpacing",
|
|
744
|
+
"type": "int24"
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
"internalType": "bool",
|
|
748
|
+
"name": "_isPool",
|
|
749
|
+
"type": "bool"
|
|
750
|
+
}
|
|
751
|
+
],
|
|
752
|
+
"name": "initialize",
|
|
753
|
+
"outputs": [],
|
|
754
|
+
"stateMutability": "nonpayable",
|
|
755
|
+
"type": "function"
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
"inputs": [
|
|
759
|
+
{
|
|
760
|
+
"internalType": "address",
|
|
761
|
+
"name": "owner",
|
|
762
|
+
"type": "address"
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
"internalType": "address",
|
|
766
|
+
"name": "operator",
|
|
767
|
+
"type": "address"
|
|
768
|
+
}
|
|
769
|
+
],
|
|
770
|
+
"name": "isApprovedForAll",
|
|
771
|
+
"outputs": [
|
|
772
|
+
{
|
|
773
|
+
"internalType": "bool",
|
|
774
|
+
"name": "",
|
|
775
|
+
"type": "bool"
|
|
776
|
+
}
|
|
777
|
+
],
|
|
778
|
+
"stateMutability": "view",
|
|
779
|
+
"type": "function"
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
"inputs": [],
|
|
783
|
+
"name": "isPool",
|
|
784
|
+
"outputs": [
|
|
785
|
+
{
|
|
786
|
+
"internalType": "bool",
|
|
787
|
+
"name": "",
|
|
788
|
+
"type": "bool"
|
|
789
|
+
}
|
|
790
|
+
],
|
|
791
|
+
"stateMutability": "view",
|
|
792
|
+
"type": "function"
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
"inputs": [],
|
|
796
|
+
"name": "lastCumulativeRewardShare",
|
|
797
|
+
"outputs": [
|
|
798
|
+
{
|
|
799
|
+
"internalType": "uint256",
|
|
800
|
+
"name": "",
|
|
801
|
+
"type": "uint256"
|
|
802
|
+
}
|
|
803
|
+
],
|
|
804
|
+
"stateMutability": "view",
|
|
805
|
+
"type": "function"
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
"inputs": [],
|
|
809
|
+
"name": "nft",
|
|
810
|
+
"outputs": [
|
|
811
|
+
{
|
|
812
|
+
"internalType": "contract INonfungiblePositionManager",
|
|
813
|
+
"name": "",
|
|
814
|
+
"type": "address"
|
|
815
|
+
}
|
|
816
|
+
],
|
|
817
|
+
"stateMutability": "view",
|
|
818
|
+
"type": "function"
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
"inputs": [
|
|
822
|
+
{
|
|
823
|
+
"internalType": "address",
|
|
824
|
+
"name": "",
|
|
825
|
+
"type": "address"
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
"internalType": "address",
|
|
829
|
+
"name": "",
|
|
830
|
+
"type": "address"
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
"internalType": "uint256",
|
|
834
|
+
"name": "",
|
|
835
|
+
"type": "uint256"
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
"internalType": "bytes",
|
|
839
|
+
"name": "",
|
|
840
|
+
"type": "bytes"
|
|
841
|
+
}
|
|
842
|
+
],
|
|
843
|
+
"name": "onERC721Received",
|
|
844
|
+
"outputs": [
|
|
845
|
+
{
|
|
846
|
+
"internalType": "bytes4",
|
|
847
|
+
"name": "",
|
|
848
|
+
"type": "bytes4"
|
|
849
|
+
}
|
|
850
|
+
],
|
|
851
|
+
"stateMutability": "nonpayable",
|
|
852
|
+
"type": "function"
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
"inputs": [],
|
|
856
|
+
"name": "pendingFees",
|
|
857
|
+
"outputs": [
|
|
858
|
+
{
|
|
859
|
+
"internalType": "uint256",
|
|
860
|
+
"name": "",
|
|
861
|
+
"type": "uint256"
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
"internalType": "uint256",
|
|
865
|
+
"name": "",
|
|
866
|
+
"type": "uint256"
|
|
867
|
+
}
|
|
868
|
+
],
|
|
869
|
+
"stateMutability": "view",
|
|
870
|
+
"type": "function"
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
"inputs": [],
|
|
874
|
+
"name": "pool",
|
|
875
|
+
"outputs": [
|
|
876
|
+
{
|
|
877
|
+
"internalType": "contract ICLPool",
|
|
878
|
+
"name": "",
|
|
879
|
+
"type": "address"
|
|
880
|
+
}
|
|
881
|
+
],
|
|
882
|
+
"stateMutability": "view",
|
|
883
|
+
"type": "function"
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
"inputs": [
|
|
887
|
+
{
|
|
888
|
+
"internalType": "uint256",
|
|
889
|
+
"name": "",
|
|
890
|
+
"type": "uint256"
|
|
891
|
+
}
|
|
892
|
+
],
|
|
893
|
+
"name": "rewardGrowthInside",
|
|
894
|
+
"outputs": [
|
|
895
|
+
{
|
|
896
|
+
"internalType": "uint256",
|
|
897
|
+
"name": "",
|
|
898
|
+
"type": "uint256"
|
|
899
|
+
}
|
|
900
|
+
],
|
|
901
|
+
"stateMutability": "view",
|
|
902
|
+
"type": "function"
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
"inputs": [
|
|
906
|
+
{
|
|
907
|
+
"internalType": "address",
|
|
908
|
+
"name": "_operator",
|
|
909
|
+
"type": "address"
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
"internalType": "bool",
|
|
913
|
+
"name": "_approved",
|
|
914
|
+
"type": "bool"
|
|
915
|
+
}
|
|
916
|
+
],
|
|
917
|
+
"name": "setApprovalForAll",
|
|
918
|
+
"outputs": [],
|
|
919
|
+
"stateMutability": "nonpayable",
|
|
920
|
+
"type": "function"
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
"inputs": [],
|
|
924
|
+
"name": "settleGauge",
|
|
925
|
+
"outputs": [
|
|
926
|
+
{
|
|
927
|
+
"internalType": "uint256",
|
|
928
|
+
"name": "_delta",
|
|
929
|
+
"type": "uint256"
|
|
930
|
+
}
|
|
931
|
+
],
|
|
932
|
+
"stateMutability": "nonpayable",
|
|
933
|
+
"type": "function"
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
"inputs": [
|
|
937
|
+
{
|
|
938
|
+
"internalType": "address",
|
|
939
|
+
"name": "depositor",
|
|
940
|
+
"type": "address"
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
"internalType": "uint256",
|
|
944
|
+
"name": "index",
|
|
945
|
+
"type": "uint256"
|
|
946
|
+
}
|
|
947
|
+
],
|
|
948
|
+
"name": "stakedByIndex",
|
|
949
|
+
"outputs": [
|
|
950
|
+
{
|
|
951
|
+
"internalType": "uint256",
|
|
952
|
+
"name": "",
|
|
953
|
+
"type": "uint256"
|
|
954
|
+
}
|
|
955
|
+
],
|
|
956
|
+
"stateMutability": "view",
|
|
957
|
+
"type": "function"
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
"inputs": [
|
|
961
|
+
{
|
|
962
|
+
"internalType": "address",
|
|
963
|
+
"name": "depositor",
|
|
964
|
+
"type": "address"
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
"internalType": "uint256",
|
|
968
|
+
"name": "tokenId",
|
|
969
|
+
"type": "uint256"
|
|
970
|
+
}
|
|
971
|
+
],
|
|
972
|
+
"name": "stakedContains",
|
|
973
|
+
"outputs": [
|
|
974
|
+
{
|
|
975
|
+
"internalType": "bool",
|
|
976
|
+
"name": "",
|
|
977
|
+
"type": "bool"
|
|
978
|
+
}
|
|
979
|
+
],
|
|
980
|
+
"stateMutability": "view",
|
|
981
|
+
"type": "function"
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
"inputs": [
|
|
985
|
+
{
|
|
986
|
+
"internalType": "address",
|
|
987
|
+
"name": "depositor",
|
|
988
|
+
"type": "address"
|
|
989
|
+
}
|
|
990
|
+
],
|
|
991
|
+
"name": "stakedLength",
|
|
992
|
+
"outputs": [
|
|
993
|
+
{
|
|
994
|
+
"internalType": "uint256",
|
|
995
|
+
"name": "",
|
|
996
|
+
"type": "uint256"
|
|
997
|
+
}
|
|
998
|
+
],
|
|
999
|
+
"stateMutability": "view",
|
|
1000
|
+
"type": "function"
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
"inputs": [
|
|
1004
|
+
{
|
|
1005
|
+
"internalType": "address",
|
|
1006
|
+
"name": "depositor",
|
|
1007
|
+
"type": "address"
|
|
1008
|
+
}
|
|
1009
|
+
],
|
|
1010
|
+
"name": "stakedValues",
|
|
1011
|
+
"outputs": [
|
|
1012
|
+
{
|
|
1013
|
+
"internalType": "uint256[]",
|
|
1014
|
+
"name": "staked",
|
|
1015
|
+
"type": "uint256[]"
|
|
1016
|
+
}
|
|
1017
|
+
],
|
|
1018
|
+
"stateMutability": "view",
|
|
1019
|
+
"type": "function"
|
|
1020
|
+
},
|
|
1021
|
+
{
|
|
1022
|
+
"inputs": [],
|
|
1023
|
+
"name": "tickSpacing",
|
|
1024
|
+
"outputs": [
|
|
1025
|
+
{
|
|
1026
|
+
"internalType": "int24",
|
|
1027
|
+
"name": "",
|
|
1028
|
+
"type": "int24"
|
|
1029
|
+
}
|
|
1030
|
+
],
|
|
1031
|
+
"stateMutability": "view",
|
|
1032
|
+
"type": "function"
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
"inputs": [],
|
|
1036
|
+
"name": "token0",
|
|
1037
|
+
"outputs": [
|
|
1038
|
+
{
|
|
1039
|
+
"internalType": "address",
|
|
1040
|
+
"name": "",
|
|
1041
|
+
"type": "address"
|
|
1042
|
+
}
|
|
1043
|
+
],
|
|
1044
|
+
"stateMutability": "view",
|
|
1045
|
+
"type": "function"
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
"inputs": [],
|
|
1049
|
+
"name": "token1",
|
|
1050
|
+
"outputs": [
|
|
1051
|
+
{
|
|
1052
|
+
"internalType": "address",
|
|
1053
|
+
"name": "",
|
|
1054
|
+
"type": "address"
|
|
1055
|
+
}
|
|
1056
|
+
],
|
|
1057
|
+
"stateMutability": "view",
|
|
1058
|
+
"type": "function"
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
"inputs": [],
|
|
1062
|
+
"name": "voter",
|
|
1063
|
+
"outputs": [
|
|
1064
|
+
{
|
|
1065
|
+
"internalType": "address",
|
|
1066
|
+
"name": "",
|
|
1067
|
+
"type": "address"
|
|
1068
|
+
}
|
|
1069
|
+
],
|
|
1070
|
+
"stateMutability": "view",
|
|
1071
|
+
"type": "function"
|
|
1072
|
+
},
|
|
1073
|
+
{
|
|
1074
|
+
"inputs": [],
|
|
1075
|
+
"name": "votingRewardsManager",
|
|
1076
|
+
"outputs": [
|
|
1077
|
+
{
|
|
1078
|
+
"internalType": "address",
|
|
1079
|
+
"name": "",
|
|
1080
|
+
"type": "address"
|
|
1081
|
+
}
|
|
1082
|
+
],
|
|
1083
|
+
"stateMutability": "view",
|
|
1084
|
+
"type": "function"
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
"inputs": [
|
|
1088
|
+
{
|
|
1089
|
+
"internalType": "uint256",
|
|
1090
|
+
"name": "_lp",
|
|
1091
|
+
"type": "uint256"
|
|
1092
|
+
}
|
|
1093
|
+
],
|
|
1094
|
+
"name": "withdraw",
|
|
1095
|
+
"outputs": [],
|
|
1096
|
+
"stateMutability": "nonpayable",
|
|
1097
|
+
"type": "function"
|
|
1098
|
+
},
|
|
1099
|
+
{
|
|
1100
|
+
"inputs": [
|
|
1101
|
+
{
|
|
1102
|
+
"internalType": "uint256",
|
|
1103
|
+
"name": "_lp",
|
|
1104
|
+
"type": "uint256"
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
"internalType": "address",
|
|
1108
|
+
"name": "_account",
|
|
1109
|
+
"type": "address"
|
|
1110
|
+
}
|
|
1111
|
+
],
|
|
1112
|
+
"name": "withdrawFrom",
|
|
1113
|
+
"outputs": [],
|
|
1114
|
+
"stateMutability": "nonpayable",
|
|
1115
|
+
"type": "function"
|
|
1116
|
+
}
|
|
1117
|
+
] as const satisfies Abi;
|
|
1118
|
+
|
|
1119
|
+
/**
|
|
1120
|
+
* Type-safe ABI for CLGauge
|
|
1121
|
+
*/
|
|
1122
|
+
export type CLGaugeAbi = typeof CLGaugeAbi;
|
|
1123
|
+
|
|
1124
|
+
/**
|
|
1125
|
+
* Contract instance type for CLGauge
|
|
1126
|
+
*/
|
|
1127
|
+
// Use any for contract type to avoid complex viem type issues
|
|
1128
|
+
// The runtime behavior is type-safe through viem's ABI typing
|
|
1129
|
+
export type CLGaugeContract = any;
|
|
1130
|
+
|
|
1131
|
+
/**
|
|
1132
|
+
* CLGauge Contract Class
|
|
1133
|
+
*
|
|
1134
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
1135
|
+
*
|
|
1136
|
+
* @example
|
|
1137
|
+
* ```typescript
|
|
1138
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
1139
|
+
* import { mainnet } from 'viem/chains';
|
|
1140
|
+
* import { CLGauge } from 'CLGauge';
|
|
1141
|
+
*
|
|
1142
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
1143
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
1144
|
+
*
|
|
1145
|
+
* const contract = new CLGauge('0x...', { publicClient, walletClient });
|
|
1146
|
+
*
|
|
1147
|
+
* // Read functions
|
|
1148
|
+
* const result = await contract.balanceOf('0x...');
|
|
1149
|
+
*
|
|
1150
|
+
* // Write functions
|
|
1151
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
1152
|
+
*
|
|
1153
|
+
* // Simulate transactions (dry-run)
|
|
1154
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
1155
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
1156
|
+
*
|
|
1157
|
+
* // Watch events
|
|
1158
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
1159
|
+
* console.log('Transfer event:', event);
|
|
1160
|
+
* });
|
|
1161
|
+
* ```
|
|
1162
|
+
*/
|
|
1163
|
+
export class CLGauge {
|
|
1164
|
+
private contract: CLGaugeContract;
|
|
1165
|
+
private contractAddress: Address;
|
|
1166
|
+
private publicClient: PublicClient;
|
|
1167
|
+
|
|
1168
|
+
constructor(
|
|
1169
|
+
address: Address,
|
|
1170
|
+
clients: {
|
|
1171
|
+
publicClient: PublicClient;
|
|
1172
|
+
walletClient?: WalletClient;
|
|
1173
|
+
}
|
|
1174
|
+
) {
|
|
1175
|
+
this.contractAddress = address;
|
|
1176
|
+
this.publicClient = clients.publicClient;
|
|
1177
|
+
this.contract = getContract({
|
|
1178
|
+
address,
|
|
1179
|
+
abi: CLGaugeAbi,
|
|
1180
|
+
client: {
|
|
1181
|
+
public: clients.publicClient,
|
|
1182
|
+
wallet: clients.walletClient,
|
|
1183
|
+
},
|
|
1184
|
+
});
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
/**
|
|
1188
|
+
* Get the contract address
|
|
1189
|
+
*/
|
|
1190
|
+
get address(): Address {
|
|
1191
|
+
return this.contractAddress;
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
/**
|
|
1195
|
+
* Get the underlying viem contract instance.
|
|
1196
|
+
*/
|
|
1197
|
+
getContract(): CLGaugeContract {
|
|
1198
|
+
return this.contract;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
/**
|
|
1202
|
+
* approvedForClaim
|
|
1203
|
+
* view
|
|
1204
|
+
*/
|
|
1205
|
+
async approvedForClaim(arg0: `0x${string}`, arg1: `0x${string}`): Promise<boolean> {
|
|
1206
|
+
return this.contract.read.approvedForClaim([arg0, arg1] as const) as Promise<boolean>;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
/**
|
|
1210
|
+
* deferredEmissions
|
|
1211
|
+
* view
|
|
1212
|
+
*/
|
|
1213
|
+
async deferredEmissions(arg0: `0x${string}`): Promise<bigint> {
|
|
1214
|
+
return this.contract.read.deferredEmissions([arg0] as const) as Promise<bigint>;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
/**
|
|
1218
|
+
* deferredReferralEmissions
|
|
1219
|
+
* view
|
|
1220
|
+
*/
|
|
1221
|
+
async deferredReferralEmissions(arg0: `0x${string}`): Promise<bigint> {
|
|
1222
|
+
return this.contract.read.deferredReferralEmissions([arg0] as const) as Promise<bigint>;
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
/**
|
|
1226
|
+
* depositBlock
|
|
1227
|
+
* view
|
|
1228
|
+
*/
|
|
1229
|
+
async depositBlock(arg0: bigint): Promise<bigint> {
|
|
1230
|
+
return this.contract.read.depositBlock([arg0] as const) as Promise<bigint>;
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
async earned(_account: `0x${string}`): Promise<bigint>;
|
|
1234
|
+
async earned(_account: `0x${string}`, _tokenIds: bigint[]): Promise<bigint>;
|
|
1235
|
+
async earned(...args: any[]): Promise<any> {
|
|
1236
|
+
return this.contract.read.earned(args as any) as Promise<any>;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
/**
|
|
1240
|
+
* gaugeFactory
|
|
1241
|
+
* view
|
|
1242
|
+
*/
|
|
1243
|
+
async gaugeFactory(): Promise<`0x${string}`> {
|
|
1244
|
+
return this.contract.read.gaugeFactory() as Promise<`0x${string}`>;
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
/**
|
|
1248
|
+
* getApproved
|
|
1249
|
+
* view
|
|
1250
|
+
*/
|
|
1251
|
+
async getApproved(tokenId: bigint): Promise<`0x${string}`> {
|
|
1252
|
+
return this.contract.read.getApproved([tokenId] as const) as Promise<`0x${string}`>;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
/**
|
|
1256
|
+
* isApprovedForAll
|
|
1257
|
+
* view
|
|
1258
|
+
*/
|
|
1259
|
+
async isApprovedForAll(owner: `0x${string}`, operator: `0x${string}`): Promise<boolean> {
|
|
1260
|
+
return this.contract.read.isApprovedForAll([owner, operator] as const) as Promise<boolean>;
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
/**
|
|
1264
|
+
* isPool
|
|
1265
|
+
* view
|
|
1266
|
+
*/
|
|
1267
|
+
async isPool(): Promise<boolean> {
|
|
1268
|
+
return this.contract.read.isPool() as Promise<boolean>;
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
/**
|
|
1272
|
+
* lastCumulativeRewardShare
|
|
1273
|
+
* view
|
|
1274
|
+
*/
|
|
1275
|
+
async lastCumulativeRewardShare(): Promise<bigint> {
|
|
1276
|
+
return this.contract.read.lastCumulativeRewardShare() as Promise<bigint>;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
/**
|
|
1280
|
+
* nft
|
|
1281
|
+
* view
|
|
1282
|
+
*/
|
|
1283
|
+
async nft(): Promise<`0x${string}`> {
|
|
1284
|
+
return this.contract.read.nft() as Promise<`0x${string}`>;
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
/**
|
|
1288
|
+
* pendingFees
|
|
1289
|
+
* view
|
|
1290
|
+
*/
|
|
1291
|
+
async pendingFees(): Promise<[bigint, bigint]> {
|
|
1292
|
+
return this.contract.read.pendingFees() as Promise<[bigint, bigint]>;
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
/**
|
|
1296
|
+
* pool
|
|
1297
|
+
* view
|
|
1298
|
+
*/
|
|
1299
|
+
async pool(): Promise<`0x${string}`> {
|
|
1300
|
+
return this.contract.read.pool() as Promise<`0x${string}`>;
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
/**
|
|
1304
|
+
* rewardGrowthInside
|
|
1305
|
+
* view
|
|
1306
|
+
*/
|
|
1307
|
+
async rewardGrowthInside(arg0: bigint): Promise<bigint> {
|
|
1308
|
+
return this.contract.read.rewardGrowthInside([arg0] as const) as Promise<bigint>;
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
/**
|
|
1312
|
+
* stakedByIndex
|
|
1313
|
+
* view
|
|
1314
|
+
*/
|
|
1315
|
+
async stakedByIndex(depositor: `0x${string}`, index: bigint): Promise<bigint> {
|
|
1316
|
+
return this.contract.read.stakedByIndex([depositor, index] as const) as Promise<bigint>;
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
/**
|
|
1320
|
+
* stakedContains
|
|
1321
|
+
* view
|
|
1322
|
+
*/
|
|
1323
|
+
async stakedContains(depositor: `0x${string}`, tokenId: bigint): Promise<boolean> {
|
|
1324
|
+
return this.contract.read.stakedContains([depositor, tokenId] as const) as Promise<boolean>;
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
/**
|
|
1328
|
+
* stakedLength
|
|
1329
|
+
* view
|
|
1330
|
+
*/
|
|
1331
|
+
async stakedLength(depositor: `0x${string}`): Promise<bigint> {
|
|
1332
|
+
return this.contract.read.stakedLength([depositor] as const) as Promise<bigint>;
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
/**
|
|
1336
|
+
* stakedValues
|
|
1337
|
+
* view
|
|
1338
|
+
*/
|
|
1339
|
+
async stakedValues(depositor: `0x${string}`): Promise<bigint[]> {
|
|
1340
|
+
return this.contract.read.stakedValues([depositor] as const) as Promise<bigint[]>;
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
/**
|
|
1344
|
+
* tickSpacing
|
|
1345
|
+
* view
|
|
1346
|
+
*/
|
|
1347
|
+
async tickSpacing(): Promise<bigint> {
|
|
1348
|
+
return this.contract.read.tickSpacing() as Promise<bigint>;
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
/**
|
|
1352
|
+
* token0
|
|
1353
|
+
* view
|
|
1354
|
+
*/
|
|
1355
|
+
async token0(): Promise<`0x${string}`> {
|
|
1356
|
+
return this.contract.read.token0() as Promise<`0x${string}`>;
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
/**
|
|
1360
|
+
* token1
|
|
1361
|
+
* view
|
|
1362
|
+
*/
|
|
1363
|
+
async token1(): Promise<`0x${string}`> {
|
|
1364
|
+
return this.contract.read.token1() as Promise<`0x${string}`>;
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
/**
|
|
1368
|
+
* voter
|
|
1369
|
+
* view
|
|
1370
|
+
*/
|
|
1371
|
+
async voter(): Promise<`0x${string}`> {
|
|
1372
|
+
return this.contract.read.voter() as Promise<`0x${string}`>;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
/**
|
|
1376
|
+
* votingRewardsManager
|
|
1377
|
+
* view
|
|
1378
|
+
*/
|
|
1379
|
+
async votingRewardsManager(): Promise<`0x${string}`> {
|
|
1380
|
+
return this.contract.read.votingRewardsManager() as Promise<`0x${string}`>;
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
/**
|
|
1384
|
+
* approve
|
|
1385
|
+
* nonpayable
|
|
1386
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1387
|
+
*/
|
|
1388
|
+
async approve(operator: `0x${string}`, tokenId: bigint, options?: {
|
|
1389
|
+
accessList?: import('viem').AccessList;
|
|
1390
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1391
|
+
chain?: import('viem').Chain | null;
|
|
1392
|
+
dataSuffix?: `0x${string}`;
|
|
1393
|
+
gas?: bigint;
|
|
1394
|
+
gasPrice?: bigint;
|
|
1395
|
+
maxFeePerGas?: bigint;
|
|
1396
|
+
maxPriorityFeePerGas?: bigint;
|
|
1397
|
+
nonce?: number;
|
|
1398
|
+
value?: bigint;
|
|
1399
|
+
}): Promise<`0x${string}`> {
|
|
1400
|
+
if (!this.contract.write) {
|
|
1401
|
+
throw new Error('Wallet client is required for write operations');
|
|
1402
|
+
}
|
|
1403
|
+
return this.contract.write.approve([operator, tokenId] as const, options) as Promise<`0x${string}`>;
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
/**
|
|
1407
|
+
* approveForClaim
|
|
1408
|
+
* nonpayable
|
|
1409
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1410
|
+
*/
|
|
1411
|
+
async approveForClaim(_operator: `0x${string}`, _approved: boolean, options?: {
|
|
1412
|
+
accessList?: import('viem').AccessList;
|
|
1413
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1414
|
+
chain?: import('viem').Chain | null;
|
|
1415
|
+
dataSuffix?: `0x${string}`;
|
|
1416
|
+
gas?: bigint;
|
|
1417
|
+
gasPrice?: bigint;
|
|
1418
|
+
maxFeePerGas?: bigint;
|
|
1419
|
+
maxPriorityFeePerGas?: bigint;
|
|
1420
|
+
nonce?: number;
|
|
1421
|
+
value?: bigint;
|
|
1422
|
+
}): Promise<`0x${string}`> {
|
|
1423
|
+
if (!this.contract.write) {
|
|
1424
|
+
throw new Error('Wallet client is required for write operations');
|
|
1425
|
+
}
|
|
1426
|
+
return this.contract.write.approveForClaim([_operator, _approved] as const, options) as Promise<`0x${string}`>;
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
async claimEmissions(_account: `0x${string}`, _recipient: `0x${string}`, _tokenIds: bigint[], options?: {
|
|
1430
|
+
accessList?: import('viem').AccessList;
|
|
1431
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1432
|
+
chain?: import('viem').Chain | null;
|
|
1433
|
+
dataSuffix?: `0x${string}`;
|
|
1434
|
+
gas?: bigint;
|
|
1435
|
+
gasPrice?: bigint;
|
|
1436
|
+
maxFeePerGas?: bigint;
|
|
1437
|
+
maxPriorityFeePerGas?: bigint;
|
|
1438
|
+
nonce?: number;
|
|
1439
|
+
value?: bigint;
|
|
1440
|
+
}): Promise<`0x${string}`>;
|
|
1441
|
+
async claimEmissions(_account: `0x${string}`, _recipient: `0x${string}`, options?: {
|
|
1442
|
+
accessList?: import('viem').AccessList;
|
|
1443
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1444
|
+
chain?: import('viem').Chain | null;
|
|
1445
|
+
dataSuffix?: `0x${string}`;
|
|
1446
|
+
gas?: bigint;
|
|
1447
|
+
gasPrice?: bigint;
|
|
1448
|
+
maxFeePerGas?: bigint;
|
|
1449
|
+
maxPriorityFeePerGas?: bigint;
|
|
1450
|
+
nonce?: number;
|
|
1451
|
+
value?: bigint;
|
|
1452
|
+
}): Promise<`0x${string}`>;
|
|
1453
|
+
async claimEmissions(...args: any[]): Promise<`0x${string}`> {
|
|
1454
|
+
if (!this.contract.write) {
|
|
1455
|
+
throw new Error('Wallet client is required for write operations');
|
|
1456
|
+
}
|
|
1457
|
+
return this.contract.write.claimEmissions(args as any) as Promise<`0x${string}`>;
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
/**
|
|
1461
|
+
* claimReferralEmissions
|
|
1462
|
+
* nonpayable
|
|
1463
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1464
|
+
*/
|
|
1465
|
+
async claimReferralEmissions(_referral: `0x${string}`, _recipient: `0x${string}`, options?: {
|
|
1466
|
+
accessList?: import('viem').AccessList;
|
|
1467
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1468
|
+
chain?: import('viem').Chain | null;
|
|
1469
|
+
dataSuffix?: `0x${string}`;
|
|
1470
|
+
gas?: bigint;
|
|
1471
|
+
gasPrice?: bigint;
|
|
1472
|
+
maxFeePerGas?: bigint;
|
|
1473
|
+
maxPriorityFeePerGas?: bigint;
|
|
1474
|
+
nonce?: number;
|
|
1475
|
+
value?: bigint;
|
|
1476
|
+
}): Promise<`0x${string}`> {
|
|
1477
|
+
if (!this.contract.write) {
|
|
1478
|
+
throw new Error('Wallet client is required for write operations');
|
|
1479
|
+
}
|
|
1480
|
+
return this.contract.write.claimReferralEmissions([_referral, _recipient] as const, options) as Promise<`0x${string}`>;
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
/**
|
|
1484
|
+
* collectFees
|
|
1485
|
+
* nonpayable
|
|
1486
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1487
|
+
*/
|
|
1488
|
+
async collectFees(options?: {
|
|
1489
|
+
accessList?: import('viem').AccessList;
|
|
1490
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1491
|
+
chain?: import('viem').Chain | null;
|
|
1492
|
+
dataSuffix?: `0x${string}`;
|
|
1493
|
+
gas?: bigint;
|
|
1494
|
+
gasPrice?: bigint;
|
|
1495
|
+
maxFeePerGas?: bigint;
|
|
1496
|
+
maxPriorityFeePerGas?: bigint;
|
|
1497
|
+
nonce?: number;
|
|
1498
|
+
value?: bigint;
|
|
1499
|
+
}): Promise<`0x${string}`> {
|
|
1500
|
+
if (!this.contract.write) {
|
|
1501
|
+
throw new Error('Wallet client is required for write operations');
|
|
1502
|
+
}
|
|
1503
|
+
return this.contract.write.collectFees(options) as Promise<`0x${string}`>;
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
/**
|
|
1507
|
+
* deposit
|
|
1508
|
+
* nonpayable
|
|
1509
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1510
|
+
*/
|
|
1511
|
+
async deposit(_lp: bigint, options?: {
|
|
1512
|
+
accessList?: import('viem').AccessList;
|
|
1513
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1514
|
+
chain?: import('viem').Chain | null;
|
|
1515
|
+
dataSuffix?: `0x${string}`;
|
|
1516
|
+
gas?: bigint;
|
|
1517
|
+
gasPrice?: bigint;
|
|
1518
|
+
maxFeePerGas?: bigint;
|
|
1519
|
+
maxPriorityFeePerGas?: bigint;
|
|
1520
|
+
nonce?: number;
|
|
1521
|
+
value?: bigint;
|
|
1522
|
+
}): Promise<`0x${string}`> {
|
|
1523
|
+
if (!this.contract.write) {
|
|
1524
|
+
throw new Error('Wallet client is required for write operations');
|
|
1525
|
+
}
|
|
1526
|
+
return this.contract.write.deposit([_lp] as const, options) as Promise<`0x${string}`>;
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
/**
|
|
1530
|
+
* depositFor
|
|
1531
|
+
* nonpayable
|
|
1532
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1533
|
+
*/
|
|
1534
|
+
async depositFor(_lp: bigint, _owner: `0x${string}`, options?: {
|
|
1535
|
+
accessList?: import('viem').AccessList;
|
|
1536
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1537
|
+
chain?: import('viem').Chain | null;
|
|
1538
|
+
dataSuffix?: `0x${string}`;
|
|
1539
|
+
gas?: bigint;
|
|
1540
|
+
gasPrice?: bigint;
|
|
1541
|
+
maxFeePerGas?: bigint;
|
|
1542
|
+
maxPriorityFeePerGas?: bigint;
|
|
1543
|
+
nonce?: number;
|
|
1544
|
+
value?: bigint;
|
|
1545
|
+
}): Promise<`0x${string}`> {
|
|
1546
|
+
if (!this.contract.write) {
|
|
1547
|
+
throw new Error('Wallet client is required for write operations');
|
|
1548
|
+
}
|
|
1549
|
+
return this.contract.write.depositFor([_lp, _owner] as const, options) as Promise<`0x${string}`>;
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
/**
|
|
1553
|
+
* emergencyWithdraw
|
|
1554
|
+
* nonpayable
|
|
1555
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1556
|
+
*/
|
|
1557
|
+
async emergencyWithdraw(tokenId: bigint, options?: {
|
|
1558
|
+
accessList?: import('viem').AccessList;
|
|
1559
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1560
|
+
chain?: import('viem').Chain | null;
|
|
1561
|
+
dataSuffix?: `0x${string}`;
|
|
1562
|
+
gas?: bigint;
|
|
1563
|
+
gasPrice?: bigint;
|
|
1564
|
+
maxFeePerGas?: bigint;
|
|
1565
|
+
maxPriorityFeePerGas?: bigint;
|
|
1566
|
+
nonce?: number;
|
|
1567
|
+
value?: bigint;
|
|
1568
|
+
}): Promise<`0x${string}`> {
|
|
1569
|
+
if (!this.contract.write) {
|
|
1570
|
+
throw new Error('Wallet client is required for write operations');
|
|
1571
|
+
}
|
|
1572
|
+
return this.contract.write.emergencyWithdraw([tokenId] as const, options) as Promise<`0x${string}`>;
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
/**
|
|
1576
|
+
* forfeitRollover
|
|
1577
|
+
* nonpayable
|
|
1578
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1579
|
+
*/
|
|
1580
|
+
async forfeitRollover(options?: {
|
|
1581
|
+
accessList?: import('viem').AccessList;
|
|
1582
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1583
|
+
chain?: import('viem').Chain | null;
|
|
1584
|
+
dataSuffix?: `0x${string}`;
|
|
1585
|
+
gas?: bigint;
|
|
1586
|
+
gasPrice?: bigint;
|
|
1587
|
+
maxFeePerGas?: bigint;
|
|
1588
|
+
maxPriorityFeePerGas?: bigint;
|
|
1589
|
+
nonce?: number;
|
|
1590
|
+
value?: bigint;
|
|
1591
|
+
}): Promise<`0x${string}`> {
|
|
1592
|
+
if (!this.contract.write) {
|
|
1593
|
+
throw new Error('Wallet client is required for write operations');
|
|
1594
|
+
}
|
|
1595
|
+
return this.contract.write.forfeitRollover(options) as Promise<`0x${string}`>;
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
/**
|
|
1599
|
+
* initialize
|
|
1600
|
+
* nonpayable
|
|
1601
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1602
|
+
*/
|
|
1603
|
+
async initialize(_pool: `0x${string}`, _votingRewardsManager: `0x${string}`, _token0: `0x${string}`, _token1: `0x${string}`, _tickSpacing: bigint, _isPool: boolean, options?: {
|
|
1604
|
+
accessList?: import('viem').AccessList;
|
|
1605
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1606
|
+
chain?: import('viem').Chain | null;
|
|
1607
|
+
dataSuffix?: `0x${string}`;
|
|
1608
|
+
gas?: bigint;
|
|
1609
|
+
gasPrice?: bigint;
|
|
1610
|
+
maxFeePerGas?: bigint;
|
|
1611
|
+
maxPriorityFeePerGas?: bigint;
|
|
1612
|
+
nonce?: number;
|
|
1613
|
+
value?: bigint;
|
|
1614
|
+
}): Promise<`0x${string}`> {
|
|
1615
|
+
if (!this.contract.write) {
|
|
1616
|
+
throw new Error('Wallet client is required for write operations');
|
|
1617
|
+
}
|
|
1618
|
+
return this.contract.write.initialize([_pool, _votingRewardsManager, _token0, _token1, _tickSpacing, _isPool] as const, options) as Promise<`0x${string}`>;
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
/**
|
|
1622
|
+
* onERC721Received
|
|
1623
|
+
* nonpayable
|
|
1624
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1625
|
+
*/
|
|
1626
|
+
async onERC721Received(arg0: `0x${string}`, arg1: `0x${string}`, arg2: bigint, arg3: `0x${string}`, options?: {
|
|
1627
|
+
accessList?: import('viem').AccessList;
|
|
1628
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1629
|
+
chain?: import('viem').Chain | null;
|
|
1630
|
+
dataSuffix?: `0x${string}`;
|
|
1631
|
+
gas?: bigint;
|
|
1632
|
+
gasPrice?: bigint;
|
|
1633
|
+
maxFeePerGas?: bigint;
|
|
1634
|
+
maxPriorityFeePerGas?: bigint;
|
|
1635
|
+
nonce?: number;
|
|
1636
|
+
value?: bigint;
|
|
1637
|
+
}): Promise<`0x${string}`> {
|
|
1638
|
+
if (!this.contract.write) {
|
|
1639
|
+
throw new Error('Wallet client is required for write operations');
|
|
1640
|
+
}
|
|
1641
|
+
return this.contract.write.onERC721Received([arg0, arg1, arg2, arg3] as const, options) as Promise<`0x${string}`>;
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
/**
|
|
1645
|
+
* setApprovalForAll
|
|
1646
|
+
* nonpayable
|
|
1647
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1648
|
+
*/
|
|
1649
|
+
async setApprovalForAll(_operator: `0x${string}`, _approved: boolean, options?: {
|
|
1650
|
+
accessList?: import('viem').AccessList;
|
|
1651
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1652
|
+
chain?: import('viem').Chain | null;
|
|
1653
|
+
dataSuffix?: `0x${string}`;
|
|
1654
|
+
gas?: bigint;
|
|
1655
|
+
gasPrice?: bigint;
|
|
1656
|
+
maxFeePerGas?: bigint;
|
|
1657
|
+
maxPriorityFeePerGas?: bigint;
|
|
1658
|
+
nonce?: number;
|
|
1659
|
+
value?: bigint;
|
|
1660
|
+
}): Promise<`0x${string}`> {
|
|
1661
|
+
if (!this.contract.write) {
|
|
1662
|
+
throw new Error('Wallet client is required for write operations');
|
|
1663
|
+
}
|
|
1664
|
+
return this.contract.write.setApprovalForAll([_operator, _approved] as const, options) as Promise<`0x${string}`>;
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
/**
|
|
1668
|
+
* settleGauge
|
|
1669
|
+
* nonpayable
|
|
1670
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1671
|
+
*/
|
|
1672
|
+
async settleGauge(options?: {
|
|
1673
|
+
accessList?: import('viem').AccessList;
|
|
1674
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1675
|
+
chain?: import('viem').Chain | null;
|
|
1676
|
+
dataSuffix?: `0x${string}`;
|
|
1677
|
+
gas?: bigint;
|
|
1678
|
+
gasPrice?: bigint;
|
|
1679
|
+
maxFeePerGas?: bigint;
|
|
1680
|
+
maxPriorityFeePerGas?: bigint;
|
|
1681
|
+
nonce?: number;
|
|
1682
|
+
value?: bigint;
|
|
1683
|
+
}): Promise<`0x${string}`> {
|
|
1684
|
+
if (!this.contract.write) {
|
|
1685
|
+
throw new Error('Wallet client is required for write operations');
|
|
1686
|
+
}
|
|
1687
|
+
return this.contract.write.settleGauge(options) as Promise<`0x${string}`>;
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
/**
|
|
1691
|
+
* withdraw
|
|
1692
|
+
* nonpayable
|
|
1693
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1694
|
+
*/
|
|
1695
|
+
async withdraw(_lp: bigint, options?: {
|
|
1696
|
+
accessList?: import('viem').AccessList;
|
|
1697
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1698
|
+
chain?: import('viem').Chain | null;
|
|
1699
|
+
dataSuffix?: `0x${string}`;
|
|
1700
|
+
gas?: bigint;
|
|
1701
|
+
gasPrice?: bigint;
|
|
1702
|
+
maxFeePerGas?: bigint;
|
|
1703
|
+
maxPriorityFeePerGas?: bigint;
|
|
1704
|
+
nonce?: number;
|
|
1705
|
+
value?: bigint;
|
|
1706
|
+
}): Promise<`0x${string}`> {
|
|
1707
|
+
if (!this.contract.write) {
|
|
1708
|
+
throw new Error('Wallet client is required for write operations');
|
|
1709
|
+
}
|
|
1710
|
+
return this.contract.write.withdraw([_lp] as const, options) as Promise<`0x${string}`>;
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1713
|
+
/**
|
|
1714
|
+
* withdrawFrom
|
|
1715
|
+
* nonpayable
|
|
1716
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1717
|
+
*/
|
|
1718
|
+
async withdrawFrom(_lp: bigint, _account: `0x${string}`, options?: {
|
|
1719
|
+
accessList?: import('viem').AccessList;
|
|
1720
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1721
|
+
chain?: import('viem').Chain | null;
|
|
1722
|
+
dataSuffix?: `0x${string}`;
|
|
1723
|
+
gas?: bigint;
|
|
1724
|
+
gasPrice?: bigint;
|
|
1725
|
+
maxFeePerGas?: bigint;
|
|
1726
|
+
maxPriorityFeePerGas?: bigint;
|
|
1727
|
+
nonce?: number;
|
|
1728
|
+
value?: bigint;
|
|
1729
|
+
}): Promise<`0x${string}`> {
|
|
1730
|
+
if (!this.contract.write) {
|
|
1731
|
+
throw new Error('Wallet client is required for write operations');
|
|
1732
|
+
}
|
|
1733
|
+
return this.contract.write.withdrawFrom([_lp, _account] as const, options) as Promise<`0x${string}`>;
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
|
|
1737
|
+
|
|
1738
|
+
/**
|
|
1739
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
1740
|
+
*
|
|
1741
|
+
* @example
|
|
1742
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
1743
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
1744
|
+
* console.log('Would succeed:', result.result);
|
|
1745
|
+
*/
|
|
1746
|
+
get simulate() {
|
|
1747
|
+
const contract = this.contract;
|
|
1748
|
+
if (!contract.simulate) {
|
|
1749
|
+
throw new Error('Public client is required for simulation');
|
|
1750
|
+
}
|
|
1751
|
+
return {
|
|
1752
|
+
/**
|
|
1753
|
+
* Simulate approve
|
|
1754
|
+
* Returns gas estimate and result without sending transaction
|
|
1755
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1756
|
+
*/
|
|
1757
|
+
async approve(operator: `0x${string}`, tokenId: bigint, options?: {
|
|
1758
|
+
accessList?: import('viem').AccessList;
|
|
1759
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1760
|
+
chain?: import('viem').Chain | null;
|
|
1761
|
+
dataSuffix?: `0x${string}`;
|
|
1762
|
+
gas?: bigint;
|
|
1763
|
+
gasPrice?: bigint;
|
|
1764
|
+
maxFeePerGas?: bigint;
|
|
1765
|
+
maxPriorityFeePerGas?: bigint;
|
|
1766
|
+
nonce?: number;
|
|
1767
|
+
value?: bigint;
|
|
1768
|
+
}): Promise<void> {
|
|
1769
|
+
return contract.simulate.approve([operator, tokenId] as const, options) as Promise<void>;
|
|
1770
|
+
},
|
|
1771
|
+
/**
|
|
1772
|
+
* Simulate approveForClaim
|
|
1773
|
+
* Returns gas estimate and result without sending transaction
|
|
1774
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1775
|
+
*/
|
|
1776
|
+
async approveForClaim(_operator: `0x${string}`, _approved: boolean, options?: {
|
|
1777
|
+
accessList?: import('viem').AccessList;
|
|
1778
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1779
|
+
chain?: import('viem').Chain | null;
|
|
1780
|
+
dataSuffix?: `0x${string}`;
|
|
1781
|
+
gas?: bigint;
|
|
1782
|
+
gasPrice?: bigint;
|
|
1783
|
+
maxFeePerGas?: bigint;
|
|
1784
|
+
maxPriorityFeePerGas?: bigint;
|
|
1785
|
+
nonce?: number;
|
|
1786
|
+
value?: bigint;
|
|
1787
|
+
}): Promise<void> {
|
|
1788
|
+
return contract.simulate.approveForClaim([_operator, _approved] as const, options) as Promise<void>;
|
|
1789
|
+
},
|
|
1790
|
+
/**
|
|
1791
|
+
* Simulate claimEmissions
|
|
1792
|
+
* Returns gas estimate and result without sending transaction
|
|
1793
|
+
* Supports multiple overloads: (address, address, uint256[]), (address, address)
|
|
1794
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1795
|
+
*/
|
|
1796
|
+
async claimEmissions(...args: any[]): Promise<any> {
|
|
1797
|
+
return contract.simulate.claimEmissions(args as any) as Promise<any>;
|
|
1798
|
+
},
|
|
1799
|
+
/**
|
|
1800
|
+
* Simulate claimReferralEmissions
|
|
1801
|
+
* Returns gas estimate and result without sending transaction
|
|
1802
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1803
|
+
*/
|
|
1804
|
+
async claimReferralEmissions(_referral: `0x${string}`, _recipient: `0x${string}`, options?: {
|
|
1805
|
+
accessList?: import('viem').AccessList;
|
|
1806
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1807
|
+
chain?: import('viem').Chain | null;
|
|
1808
|
+
dataSuffix?: `0x${string}`;
|
|
1809
|
+
gas?: bigint;
|
|
1810
|
+
gasPrice?: bigint;
|
|
1811
|
+
maxFeePerGas?: bigint;
|
|
1812
|
+
maxPriorityFeePerGas?: bigint;
|
|
1813
|
+
nonce?: number;
|
|
1814
|
+
value?: bigint;
|
|
1815
|
+
}): Promise<void> {
|
|
1816
|
+
return contract.simulate.claimReferralEmissions([_referral, _recipient] as const, options) as Promise<void>;
|
|
1817
|
+
},
|
|
1818
|
+
/**
|
|
1819
|
+
* Simulate collectFees
|
|
1820
|
+
* Returns gas estimate and result without sending transaction
|
|
1821
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1822
|
+
*/
|
|
1823
|
+
async collectFees(options?: {
|
|
1824
|
+
accessList?: import('viem').AccessList;
|
|
1825
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1826
|
+
chain?: import('viem').Chain | null;
|
|
1827
|
+
dataSuffix?: `0x${string}`;
|
|
1828
|
+
gas?: bigint;
|
|
1829
|
+
gasPrice?: bigint;
|
|
1830
|
+
maxFeePerGas?: bigint;
|
|
1831
|
+
maxPriorityFeePerGas?: bigint;
|
|
1832
|
+
nonce?: number;
|
|
1833
|
+
value?: bigint;
|
|
1834
|
+
}): Promise<[bigint, bigint]> {
|
|
1835
|
+
return contract.simulate.collectFees(options) as Promise<[bigint, bigint]>;
|
|
1836
|
+
},
|
|
1837
|
+
/**
|
|
1838
|
+
* Simulate deposit
|
|
1839
|
+
* Returns gas estimate and result without sending transaction
|
|
1840
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1841
|
+
*/
|
|
1842
|
+
async deposit(_lp: bigint, options?: {
|
|
1843
|
+
accessList?: import('viem').AccessList;
|
|
1844
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1845
|
+
chain?: import('viem').Chain | null;
|
|
1846
|
+
dataSuffix?: `0x${string}`;
|
|
1847
|
+
gas?: bigint;
|
|
1848
|
+
gasPrice?: bigint;
|
|
1849
|
+
maxFeePerGas?: bigint;
|
|
1850
|
+
maxPriorityFeePerGas?: bigint;
|
|
1851
|
+
nonce?: number;
|
|
1852
|
+
value?: bigint;
|
|
1853
|
+
}): Promise<void> {
|
|
1854
|
+
return contract.simulate.deposit([_lp] as const, options) as Promise<void>;
|
|
1855
|
+
},
|
|
1856
|
+
/**
|
|
1857
|
+
* Simulate depositFor
|
|
1858
|
+
* Returns gas estimate and result without sending transaction
|
|
1859
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1860
|
+
*/
|
|
1861
|
+
async depositFor(_lp: bigint, _owner: `0x${string}`, options?: {
|
|
1862
|
+
accessList?: import('viem').AccessList;
|
|
1863
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1864
|
+
chain?: import('viem').Chain | null;
|
|
1865
|
+
dataSuffix?: `0x${string}`;
|
|
1866
|
+
gas?: bigint;
|
|
1867
|
+
gasPrice?: bigint;
|
|
1868
|
+
maxFeePerGas?: bigint;
|
|
1869
|
+
maxPriorityFeePerGas?: bigint;
|
|
1870
|
+
nonce?: number;
|
|
1871
|
+
value?: bigint;
|
|
1872
|
+
}): Promise<void> {
|
|
1873
|
+
return contract.simulate.depositFor([_lp, _owner] as const, options) as Promise<void>;
|
|
1874
|
+
},
|
|
1875
|
+
/**
|
|
1876
|
+
* Simulate emergencyWithdraw
|
|
1877
|
+
* Returns gas estimate and result without sending transaction
|
|
1878
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1879
|
+
*/
|
|
1880
|
+
async emergencyWithdraw(tokenId: bigint, options?: {
|
|
1881
|
+
accessList?: import('viem').AccessList;
|
|
1882
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1883
|
+
chain?: import('viem').Chain | null;
|
|
1884
|
+
dataSuffix?: `0x${string}`;
|
|
1885
|
+
gas?: bigint;
|
|
1886
|
+
gasPrice?: bigint;
|
|
1887
|
+
maxFeePerGas?: bigint;
|
|
1888
|
+
maxPriorityFeePerGas?: bigint;
|
|
1889
|
+
nonce?: number;
|
|
1890
|
+
value?: bigint;
|
|
1891
|
+
}): Promise<void> {
|
|
1892
|
+
return contract.simulate.emergencyWithdraw([tokenId] as const, options) as Promise<void>;
|
|
1893
|
+
},
|
|
1894
|
+
/**
|
|
1895
|
+
* Simulate forfeitRollover
|
|
1896
|
+
* Returns gas estimate and result without sending transaction
|
|
1897
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1898
|
+
*/
|
|
1899
|
+
async forfeitRollover(options?: {
|
|
1900
|
+
accessList?: import('viem').AccessList;
|
|
1901
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1902
|
+
chain?: import('viem').Chain | null;
|
|
1903
|
+
dataSuffix?: `0x${string}`;
|
|
1904
|
+
gas?: bigint;
|
|
1905
|
+
gasPrice?: bigint;
|
|
1906
|
+
maxFeePerGas?: bigint;
|
|
1907
|
+
maxPriorityFeePerGas?: bigint;
|
|
1908
|
+
nonce?: number;
|
|
1909
|
+
value?: bigint;
|
|
1910
|
+
}): Promise<void> {
|
|
1911
|
+
return contract.simulate.forfeitRollover(options) as Promise<void>;
|
|
1912
|
+
},
|
|
1913
|
+
/**
|
|
1914
|
+
* Simulate initialize
|
|
1915
|
+
* Returns gas estimate and result without sending transaction
|
|
1916
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1917
|
+
*/
|
|
1918
|
+
async initialize(_pool: `0x${string}`, _votingRewardsManager: `0x${string}`, _token0: `0x${string}`, _token1: `0x${string}`, _tickSpacing: bigint, _isPool: boolean, options?: {
|
|
1919
|
+
accessList?: import('viem').AccessList;
|
|
1920
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1921
|
+
chain?: import('viem').Chain | null;
|
|
1922
|
+
dataSuffix?: `0x${string}`;
|
|
1923
|
+
gas?: bigint;
|
|
1924
|
+
gasPrice?: bigint;
|
|
1925
|
+
maxFeePerGas?: bigint;
|
|
1926
|
+
maxPriorityFeePerGas?: bigint;
|
|
1927
|
+
nonce?: number;
|
|
1928
|
+
value?: bigint;
|
|
1929
|
+
}): Promise<void> {
|
|
1930
|
+
return contract.simulate.initialize([_pool, _votingRewardsManager, _token0, _token1, _tickSpacing, _isPool] as const, options) as Promise<void>;
|
|
1931
|
+
},
|
|
1932
|
+
/**
|
|
1933
|
+
* Simulate onERC721Received
|
|
1934
|
+
* Returns gas estimate and result without sending transaction
|
|
1935
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1936
|
+
*/
|
|
1937
|
+
async onERC721Received(arg0: `0x${string}`, arg1: `0x${string}`, arg2: bigint, arg3: `0x${string}`, options?: {
|
|
1938
|
+
accessList?: import('viem').AccessList;
|
|
1939
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1940
|
+
chain?: import('viem').Chain | null;
|
|
1941
|
+
dataSuffix?: `0x${string}`;
|
|
1942
|
+
gas?: bigint;
|
|
1943
|
+
gasPrice?: bigint;
|
|
1944
|
+
maxFeePerGas?: bigint;
|
|
1945
|
+
maxPriorityFeePerGas?: bigint;
|
|
1946
|
+
nonce?: number;
|
|
1947
|
+
value?: bigint;
|
|
1948
|
+
}): Promise<`0x${string}`> {
|
|
1949
|
+
return contract.simulate.onERC721Received([arg0, arg1, arg2, arg3] as const, options) as Promise<`0x${string}`>;
|
|
1950
|
+
},
|
|
1951
|
+
/**
|
|
1952
|
+
* Simulate setApprovalForAll
|
|
1953
|
+
* Returns gas estimate and result without sending transaction
|
|
1954
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1955
|
+
*/
|
|
1956
|
+
async setApprovalForAll(_operator: `0x${string}`, _approved: boolean, options?: {
|
|
1957
|
+
accessList?: import('viem').AccessList;
|
|
1958
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1959
|
+
chain?: import('viem').Chain | null;
|
|
1960
|
+
dataSuffix?: `0x${string}`;
|
|
1961
|
+
gas?: bigint;
|
|
1962
|
+
gasPrice?: bigint;
|
|
1963
|
+
maxFeePerGas?: bigint;
|
|
1964
|
+
maxPriorityFeePerGas?: bigint;
|
|
1965
|
+
nonce?: number;
|
|
1966
|
+
value?: bigint;
|
|
1967
|
+
}): Promise<void> {
|
|
1968
|
+
return contract.simulate.setApprovalForAll([_operator, _approved] as const, options) as Promise<void>;
|
|
1969
|
+
},
|
|
1970
|
+
/**
|
|
1971
|
+
* Simulate settleGauge
|
|
1972
|
+
* Returns gas estimate and result without sending transaction
|
|
1973
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1974
|
+
*/
|
|
1975
|
+
async settleGauge(options?: {
|
|
1976
|
+
accessList?: import('viem').AccessList;
|
|
1977
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1978
|
+
chain?: import('viem').Chain | null;
|
|
1979
|
+
dataSuffix?: `0x${string}`;
|
|
1980
|
+
gas?: bigint;
|
|
1981
|
+
gasPrice?: bigint;
|
|
1982
|
+
maxFeePerGas?: bigint;
|
|
1983
|
+
maxPriorityFeePerGas?: bigint;
|
|
1984
|
+
nonce?: number;
|
|
1985
|
+
value?: bigint;
|
|
1986
|
+
}): Promise<bigint> {
|
|
1987
|
+
return contract.simulate.settleGauge(options) as Promise<bigint>;
|
|
1988
|
+
},
|
|
1989
|
+
/**
|
|
1990
|
+
* Simulate withdraw
|
|
1991
|
+
* Returns gas estimate and result without sending transaction
|
|
1992
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1993
|
+
*/
|
|
1994
|
+
async withdraw(_lp: bigint, options?: {
|
|
1995
|
+
accessList?: import('viem').AccessList;
|
|
1996
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1997
|
+
chain?: import('viem').Chain | null;
|
|
1998
|
+
dataSuffix?: `0x${string}`;
|
|
1999
|
+
gas?: bigint;
|
|
2000
|
+
gasPrice?: bigint;
|
|
2001
|
+
maxFeePerGas?: bigint;
|
|
2002
|
+
maxPriorityFeePerGas?: bigint;
|
|
2003
|
+
nonce?: number;
|
|
2004
|
+
value?: bigint;
|
|
2005
|
+
}): Promise<void> {
|
|
2006
|
+
return contract.simulate.withdraw([_lp] as const, options) as Promise<void>;
|
|
2007
|
+
},
|
|
2008
|
+
/**
|
|
2009
|
+
* Simulate withdrawFrom
|
|
2010
|
+
* Returns gas estimate and result without sending transaction
|
|
2011
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2012
|
+
*/
|
|
2013
|
+
async withdrawFrom(_lp: bigint, _account: `0x${string}`, options?: {
|
|
2014
|
+
accessList?: import('viem').AccessList;
|
|
2015
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2016
|
+
chain?: import('viem').Chain | null;
|
|
2017
|
+
dataSuffix?: `0x${string}`;
|
|
2018
|
+
gas?: bigint;
|
|
2019
|
+
gasPrice?: bigint;
|
|
2020
|
+
maxFeePerGas?: bigint;
|
|
2021
|
+
maxPriorityFeePerGas?: bigint;
|
|
2022
|
+
nonce?: number;
|
|
2023
|
+
value?: bigint;
|
|
2024
|
+
}): Promise<void> {
|
|
2025
|
+
return contract.simulate.withdrawFrom([_lp, _account] as const, options) as Promise<void>;
|
|
2026
|
+
}
|
|
2027
|
+
};
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2030
|
+
/**
|
|
2031
|
+
* Watch contract events
|
|
2032
|
+
*
|
|
2033
|
+
* @example
|
|
2034
|
+
* // Watch all Transfer events
|
|
2035
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
2036
|
+
* console.log('Transfer:', event);
|
|
2037
|
+
* });
|
|
2038
|
+
*
|
|
2039
|
+
* // Stop watching
|
|
2040
|
+
* unwatch();
|
|
2041
|
+
*/
|
|
2042
|
+
get watch() {
|
|
2043
|
+
return {
|
|
2044
|
+
/**
|
|
2045
|
+
* Watch Approval events
|
|
2046
|
+
* @param callback Function to call when event is emitted
|
|
2047
|
+
* @param filter Optional filter for indexed parameters
|
|
2048
|
+
* @returns Unwatch function to stop listening
|
|
2049
|
+
*/
|
|
2050
|
+
Approval: (callback: (event: { _owner: `0x${string}`; _operator: `0x${string}`; _tokenId: bigint }) => void, filter?: { _owner?: `0x${string}` | `0x${string}`[] | null; _operator?: `0x${string}` | `0x${string}`[] | null; _tokenId?: bigint | bigint[] | null }) => {
|
|
2051
|
+
return this.publicClient.watchContractEvent({
|
|
2052
|
+
address: this.contractAddress,
|
|
2053
|
+
abi: CLGaugeAbi,
|
|
2054
|
+
eventName: 'Approval',
|
|
2055
|
+
args: filter as any,
|
|
2056
|
+
onLogs: (logs: any[]) => {
|
|
2057
|
+
logs.forEach((log: any) => {
|
|
2058
|
+
callback(log.args as any);
|
|
2059
|
+
});
|
|
2060
|
+
},
|
|
2061
|
+
}) as () => void;
|
|
2062
|
+
},
|
|
2063
|
+
/**
|
|
2064
|
+
* Watch ApprovalForAll events
|
|
2065
|
+
* @param callback Function to call when event is emitted
|
|
2066
|
+
* @param filter Optional filter for indexed parameters
|
|
2067
|
+
* @returns Unwatch function to stop listening
|
|
2068
|
+
*/
|
|
2069
|
+
ApprovalForAll: (callback: (event: { _owner: `0x${string}`; _operator: `0x${string}`; _approved: boolean }) => void, filter?: { _owner?: `0x${string}` | `0x${string}`[] | null; _operator?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
2070
|
+
return this.publicClient.watchContractEvent({
|
|
2071
|
+
address: this.contractAddress,
|
|
2072
|
+
abi: CLGaugeAbi,
|
|
2073
|
+
eventName: 'ApprovalForAll',
|
|
2074
|
+
args: filter as any,
|
|
2075
|
+
onLogs: (logs: any[]) => {
|
|
2076
|
+
logs.forEach((log: any) => {
|
|
2077
|
+
callback(log.args as any);
|
|
2078
|
+
});
|
|
2079
|
+
},
|
|
2080
|
+
}) as () => void;
|
|
2081
|
+
},
|
|
2082
|
+
/**
|
|
2083
|
+
* Watch ClaimApproval events
|
|
2084
|
+
* @param callback Function to call when event is emitted
|
|
2085
|
+
* @param filter Optional filter for indexed parameters
|
|
2086
|
+
* @returns Unwatch function to stop listening
|
|
2087
|
+
*/
|
|
2088
|
+
ClaimApproval: (callback: (event: { _account: `0x${string}`; _operator: `0x${string}`; _approved: boolean }) => void, filter?: { _account?: `0x${string}` | `0x${string}`[] | null; _operator?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
2089
|
+
return this.publicClient.watchContractEvent({
|
|
2090
|
+
address: this.contractAddress,
|
|
2091
|
+
abi: CLGaugeAbi,
|
|
2092
|
+
eventName: 'ClaimApproval',
|
|
2093
|
+
args: filter as any,
|
|
2094
|
+
onLogs: (logs: any[]) => {
|
|
2095
|
+
logs.forEach((log: any) => {
|
|
2096
|
+
callback(log.args as any);
|
|
2097
|
+
});
|
|
2098
|
+
},
|
|
2099
|
+
}) as () => void;
|
|
2100
|
+
},
|
|
2101
|
+
/**
|
|
2102
|
+
* Watch ClaimFees events
|
|
2103
|
+
* @param callback Function to call when event is emitted
|
|
2104
|
+
* @param filter Optional filter for indexed parameters
|
|
2105
|
+
* @returns Unwatch function to stop listening
|
|
2106
|
+
*/
|
|
2107
|
+
ClaimFees: (callback: (event: { _caller: `0x${string}`; _claimed0: bigint; _claimed1: bigint }) => void, filter?: { _caller?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
2108
|
+
return this.publicClient.watchContractEvent({
|
|
2109
|
+
address: this.contractAddress,
|
|
2110
|
+
abi: CLGaugeAbi,
|
|
2111
|
+
eventName: 'ClaimFees',
|
|
2112
|
+
args: filter as any,
|
|
2113
|
+
onLogs: (logs: any[]) => {
|
|
2114
|
+
logs.forEach((log: any) => {
|
|
2115
|
+
callback(log.args as any);
|
|
2116
|
+
});
|
|
2117
|
+
},
|
|
2118
|
+
}) as () => void;
|
|
2119
|
+
},
|
|
2120
|
+
/**
|
|
2121
|
+
* Watch DeferredEmissionsClaimed events
|
|
2122
|
+
* @param callback Function to call when event is emitted
|
|
2123
|
+
* @param filter Optional filter for indexed parameters
|
|
2124
|
+
* @returns Unwatch function to stop listening
|
|
2125
|
+
*/
|
|
2126
|
+
DeferredEmissionsClaimed: (callback: (event: { _account: `0x${string}`; _recipient: `0x${string}`; _amount: bigint }) => void, filter?: { _account?: `0x${string}` | `0x${string}`[] | null; _recipient?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
2127
|
+
return this.publicClient.watchContractEvent({
|
|
2128
|
+
address: this.contractAddress,
|
|
2129
|
+
abi: CLGaugeAbi,
|
|
2130
|
+
eventName: 'DeferredEmissionsClaimed',
|
|
2131
|
+
args: filter as any,
|
|
2132
|
+
onLogs: (logs: any[]) => {
|
|
2133
|
+
logs.forEach((log: any) => {
|
|
2134
|
+
callback(log.args as any);
|
|
2135
|
+
});
|
|
2136
|
+
},
|
|
2137
|
+
}) as () => void;
|
|
2138
|
+
},
|
|
2139
|
+
/**
|
|
2140
|
+
* Watch Deposit events
|
|
2141
|
+
* @param callback Function to call when event is emitted
|
|
2142
|
+
* @param filter Optional filter for indexed parameters
|
|
2143
|
+
* @returns Unwatch function to stop listening
|
|
2144
|
+
*/
|
|
2145
|
+
Deposit: (callback: (event: { _caller: `0x${string}`; _user: `0x${string}`; _tokenId: bigint; _liquidityToStake: bigint }) => void, filter?: { _caller?: `0x${string}` | `0x${string}`[] | null; _user?: `0x${string}` | `0x${string}`[] | null; _tokenId?: bigint | bigint[] | null }) => {
|
|
2146
|
+
return this.publicClient.watchContractEvent({
|
|
2147
|
+
address: this.contractAddress,
|
|
2148
|
+
abi: CLGaugeAbi,
|
|
2149
|
+
eventName: 'Deposit',
|
|
2150
|
+
args: filter as any,
|
|
2151
|
+
onLogs: (logs: any[]) => {
|
|
2152
|
+
logs.forEach((log: any) => {
|
|
2153
|
+
callback(log.args as any);
|
|
2154
|
+
});
|
|
2155
|
+
},
|
|
2156
|
+
}) as () => void;
|
|
2157
|
+
},
|
|
2158
|
+
/**
|
|
2159
|
+
* Watch EarlyWithdrawPenalty events
|
|
2160
|
+
* @param callback Function to call when event is emitted
|
|
2161
|
+
* @param filter Optional filter for indexed parameters
|
|
2162
|
+
* @returns Unwatch function to stop listening
|
|
2163
|
+
*/
|
|
2164
|
+
EarlyWithdrawPenalty: (callback: (event: { _from: `0x${string}`; _tokenId: bigint; _penalty: bigint }) => void, filter?: { _from?: `0x${string}` | `0x${string}`[] | null; _tokenId?: bigint | bigint[] | null }) => {
|
|
2165
|
+
return this.publicClient.watchContractEvent({
|
|
2166
|
+
address: this.contractAddress,
|
|
2167
|
+
abi: CLGaugeAbi,
|
|
2168
|
+
eventName: 'EarlyWithdrawPenalty',
|
|
2169
|
+
args: filter as any,
|
|
2170
|
+
onLogs: (logs: any[]) => {
|
|
2171
|
+
logs.forEach((log: any) => {
|
|
2172
|
+
callback(log.args as any);
|
|
2173
|
+
});
|
|
2174
|
+
},
|
|
2175
|
+
}) as () => void;
|
|
2176
|
+
},
|
|
2177
|
+
/**
|
|
2178
|
+
* Watch EmergencyWithdraw events
|
|
2179
|
+
* @param callback Function to call when event is emitted
|
|
2180
|
+
* @param filter Optional filter for indexed parameters
|
|
2181
|
+
* @returns Unwatch function to stop listening
|
|
2182
|
+
*/
|
|
2183
|
+
EmergencyWithdraw: (callback: (event: { _user: `0x${string}`; _tokenId: bigint; _liquidityToStake: bigint }) => void, filter?: { _user?: `0x${string}` | `0x${string}`[] | null; _tokenId?: bigint | bigint[] | null }) => {
|
|
2184
|
+
return this.publicClient.watchContractEvent({
|
|
2185
|
+
address: this.contractAddress,
|
|
2186
|
+
abi: CLGaugeAbi,
|
|
2187
|
+
eventName: 'EmergencyWithdraw',
|
|
2188
|
+
args: filter as any,
|
|
2189
|
+
onLogs: (logs: any[]) => {
|
|
2190
|
+
logs.forEach((log: any) => {
|
|
2191
|
+
callback(log.args as any);
|
|
2192
|
+
});
|
|
2193
|
+
},
|
|
2194
|
+
}) as () => void;
|
|
2195
|
+
},
|
|
2196
|
+
/**
|
|
2197
|
+
* Watch EmissionsClaimed events
|
|
2198
|
+
* @param callback Function to call when event is emitted
|
|
2199
|
+
* @param filter Optional filter for indexed parameters
|
|
2200
|
+
* @returns Unwatch function to stop listening
|
|
2201
|
+
*/
|
|
2202
|
+
EmissionsClaimed: (callback: (event: { _account: `0x${string}`; _tokenId: bigint; _recipient: `0x${string}`; _rewardAmount: bigint }) => void, filter?: { _account?: `0x${string}` | `0x${string}`[] | null; _tokenId?: bigint | bigint[] | null; _recipient?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
2203
|
+
return this.publicClient.watchContractEvent({
|
|
2204
|
+
address: this.contractAddress,
|
|
2205
|
+
abi: CLGaugeAbi,
|
|
2206
|
+
eventName: 'EmissionsClaimed',
|
|
2207
|
+
args: filter as any,
|
|
2208
|
+
onLogs: (logs: any[]) => {
|
|
2209
|
+
logs.forEach((log: any) => {
|
|
2210
|
+
callback(log.args as any);
|
|
2211
|
+
});
|
|
2212
|
+
},
|
|
2213
|
+
}) as () => void;
|
|
2214
|
+
},
|
|
2215
|
+
/**
|
|
2216
|
+
* Watch EmissionsDeferred events
|
|
2217
|
+
* @param callback Function to call when event is emitted
|
|
2218
|
+
* @param filter Optional filter for indexed parameters
|
|
2219
|
+
* @returns Unwatch function to stop listening
|
|
2220
|
+
*/
|
|
2221
|
+
EmissionsDeferred: (callback: (event: { _account: `0x${string}`; _tokenId: bigint; _rewardAmount: bigint }) => void, filter?: { _account?: `0x${string}` | `0x${string}`[] | null; _tokenId?: bigint | bigint[] | null }) => {
|
|
2222
|
+
return this.publicClient.watchContractEvent({
|
|
2223
|
+
address: this.contractAddress,
|
|
2224
|
+
abi: CLGaugeAbi,
|
|
2225
|
+
eventName: 'EmissionsDeferred',
|
|
2226
|
+
args: filter as any,
|
|
2227
|
+
onLogs: (logs: any[]) => {
|
|
2228
|
+
logs.forEach((log: any) => {
|
|
2229
|
+
callback(log.args as any);
|
|
2230
|
+
});
|
|
2231
|
+
},
|
|
2232
|
+
}) as () => void;
|
|
2233
|
+
},
|
|
2234
|
+
/**
|
|
2235
|
+
* Watch GaugeSettled events
|
|
2236
|
+
* @param callback Function to call when event is emitted
|
|
2237
|
+
* @param filter Optional filter for indexed parameters
|
|
2238
|
+
* @returns Unwatch function to stop listening
|
|
2239
|
+
*/
|
|
2240
|
+
GaugeSettled: (callback: (event: { _cumulativeRewardShare: bigint; _delta: bigint }) => void) => {
|
|
2241
|
+
return this.publicClient.watchContractEvent({
|
|
2242
|
+
address: this.contractAddress,
|
|
2243
|
+
abi: CLGaugeAbi,
|
|
2244
|
+
eventName: 'GaugeSettled',
|
|
2245
|
+
|
|
2246
|
+
onLogs: (logs: any[]) => {
|
|
2247
|
+
logs.forEach((log: any) => {
|
|
2248
|
+
callback(log.args as any);
|
|
2249
|
+
});
|
|
2250
|
+
},
|
|
2251
|
+
}) as () => void;
|
|
2252
|
+
},
|
|
2253
|
+
/**
|
|
2254
|
+
* Watch ReferralEmissionsClaimed events
|
|
2255
|
+
* @param callback Function to call when event is emitted
|
|
2256
|
+
* @param filter Optional filter for indexed parameters
|
|
2257
|
+
* @returns Unwatch function to stop listening
|
|
2258
|
+
*/
|
|
2259
|
+
ReferralEmissionsClaimed: (callback: (event: { _referral: `0x${string}`; _recipient: `0x${string}`; _amount: bigint }) => void, filter?: { _referral?: `0x${string}` | `0x${string}`[] | null; _recipient?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
2260
|
+
return this.publicClient.watchContractEvent({
|
|
2261
|
+
address: this.contractAddress,
|
|
2262
|
+
abi: CLGaugeAbi,
|
|
2263
|
+
eventName: 'ReferralEmissionsClaimed',
|
|
2264
|
+
args: filter as any,
|
|
2265
|
+
onLogs: (logs: any[]) => {
|
|
2266
|
+
logs.forEach((log: any) => {
|
|
2267
|
+
callback(log.args as any);
|
|
2268
|
+
});
|
|
2269
|
+
},
|
|
2270
|
+
}) as () => void;
|
|
2271
|
+
},
|
|
2272
|
+
/**
|
|
2273
|
+
* Watch ReferralEmissionsDeferred events
|
|
2274
|
+
* @param callback Function to call when event is emitted
|
|
2275
|
+
* @param filter Optional filter for indexed parameters
|
|
2276
|
+
* @returns Unwatch function to stop listening
|
|
2277
|
+
*/
|
|
2278
|
+
ReferralEmissionsDeferred: (callback: (event: { _account: `0x${string}`; _tokenId: bigint; _referral: `0x${string}`; _amount: bigint }) => void, filter?: { _account?: `0x${string}` | `0x${string}`[] | null; _tokenId?: bigint | bigint[] | null; _referral?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
2279
|
+
return this.publicClient.watchContractEvent({
|
|
2280
|
+
address: this.contractAddress,
|
|
2281
|
+
abi: CLGaugeAbi,
|
|
2282
|
+
eventName: 'ReferralEmissionsDeferred',
|
|
2283
|
+
args: filter as any,
|
|
2284
|
+
onLogs: (logs: any[]) => {
|
|
2285
|
+
logs.forEach((log: any) => {
|
|
2286
|
+
callback(log.args as any);
|
|
2287
|
+
});
|
|
2288
|
+
},
|
|
2289
|
+
}) as () => void;
|
|
2290
|
+
},
|
|
2291
|
+
/**
|
|
2292
|
+
* Watch Withdraw events
|
|
2293
|
+
* @param callback Function to call when event is emitted
|
|
2294
|
+
* @param filter Optional filter for indexed parameters
|
|
2295
|
+
* @returns Unwatch function to stop listening
|
|
2296
|
+
*/
|
|
2297
|
+
Withdraw: (callback: (event: { _caller: `0x${string}`; _user: `0x${string}`; _tokenId: bigint; _liquidityToStake: bigint }) => void, filter?: { _caller?: `0x${string}` | `0x${string}`[] | null; _user?: `0x${string}` | `0x${string}`[] | null; _tokenId?: bigint | bigint[] | null }) => {
|
|
2298
|
+
return this.publicClient.watchContractEvent({
|
|
2299
|
+
address: this.contractAddress,
|
|
2300
|
+
abi: CLGaugeAbi,
|
|
2301
|
+
eventName: 'Withdraw',
|
|
2302
|
+
args: filter as any,
|
|
2303
|
+
onLogs: (logs: any[]) => {
|
|
2304
|
+
logs.forEach((log: any) => {
|
|
2305
|
+
callback(log.args as any);
|
|
2306
|
+
});
|
|
2307
|
+
},
|
|
2308
|
+
}) as () => void;
|
|
2309
|
+
}
|
|
2310
|
+
};
|
|
2311
|
+
}
|
|
2312
|
+
}
|